14295 Commits

Author SHA1 Message Date
cb036e5ef7 libpod/networking_linux.go: switch to sha256 hashes
SHA-1 is prone to collisions.

This will likely break connectivity between old containers started
before update and containers started after update. It will also fail to
cleanup old netns. A reboot will fix this, so a reboot is recommended
after update.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit 44642bee8720c0a19c97c6e116d725fd5f95daad)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-04-26 14:33:23 -04:00
94aa32943a Merge pull request #13842 from lsm5/v4.0-rhel-cve-2022-27191-backport
[v4.0-rhel backport] Bump golang.org/x/crypto to 7b82a4e
2022-04-12 15:39:43 -04:00
9049500f8b Bump golang.org/x/crypto to 7b82a4e
Resolves: GHSA-8c26-wmh5-6g9v - CVE-2022-27191

Podman doesn't seem to be directly affected as the logic in question
is not called.

golang.org/x/crypto@1baeb1ce contains the actual CVE fix. Using the
latest upstream commit to also include support for SHA-2.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit 5e680d54e9e8b849b90047d2d87bc7664edaaa1d)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-04-12 10:47:24 -04:00
3d24a66f0d Merge pull request #13695 from giuseppe/v4.0-rhel-backport-no-inheritable
[4.0-rhel] do not set the inheritable capabilities
2022-03-29 14:48:01 -04:00
4f7321f1bb test: fix podman run test as rootless
aafa80918a245edcbdaceb1191d749570f1872d0 introduced the regression.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit 640c2d53a88f46e997d4e5a594cfc85a57e74d36)
2022-03-29 17:44:52 +02:00
c919f0b884 do not set the inheritable capabilities
The kernel never sets the inheritable capabilities for a process, they
are only set by userspace.  Emulate the same behavior.

Closes: CVE-2022-27649

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit aafa80918a245edcbdaceb1191d749570f1872d0)
2022-03-29 17:44:50 +02:00
bb1e6e6b7b Merge pull request #13623 from flouthoc/backport-parallel-build-v4.0-rhel
[v4.0-rhel backport] bump to race-free `c/image` and `c/storage` along with test to verify `concurrent/parallel` builds
2022-03-24 18:11:46 +01:00
b6776dbe04 Merge pull request #13644 from lsm5/v4.0-rhel-cve-2022-21698
Bump github.com/prometheus/client_golang to v1.11.1
2022-03-24 18:07:45 +01:00
5a54f81537 Merge pull request #13608 from vrothberg/v4.0-backports
[v4.0-rhel] vendor c/common@v0.47.5
2022-03-24 16:27:41 +01:00
dfacd7979d Merge pull request #13555 from openshift-cherrypick-robot/cherry-pick-13485-to-v4.0-rhel
[v4.0-rhel] slirp: fix setup on ipv6 disabled systems
2022-03-24 16:11:39 +01:00
ef9e18d7b7 Bump github.com/prometheus/client_golang to v1.11.1
Resolves: CVE-2022-21698

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-24 10:14:36 -04:00
1ea57249fa test: add a test to verify race free concurrent/parallel builds
Invoking parallel/concurrent builds from podman race against each other
following behviour was fixed in
containers/storage#1153 and containers/image#1480

Test verifies if following bug is fixed in new race-free API or not.
Read more about this issue, see bz 2055487 for more details.

Test manually backported from: 63f92d0a66

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-24 00:00:28 +05:30
c9a44ef07e vendor: bump c/image to v5.19.2
Bump c/image to upstream v5.19.2 so podman could use new race-free
code.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-24 00:00:11 +05:30
a54be69cb5 vendor: bump c/storage to v1.38.3
Bump c/storage to v1.38.3 so podman could use new `race-free`
`AddNames` and `RemoveNames` api

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-23 23:53:58 +05:30
e19c4e5b03 vendor c/common@v0.47.5
Update the login tests to reflect the latest changes to allow http{s}
prefixes (again) to address bugzilla.redhat.com/show_bug.cgi?id=2062072.

Backport of commit 57cdc21b0057.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-23 13:47:58 +01:00
02f1647753 slirp: fix setup on ipv6 disabled systems
When enable_ipv6=true is set for slirp4netns (default since podman v4),
we will try to set the accept sysctl. This sysctl will not exist on
systems that have ipv6 disabled. In this case we should not error and
just ignore the extra ipv6 setup.

Also the current logic to wait for the slirp4 setup was kinda broken, it
did not actually wait until the sysctl was set before starting slirp.
This should now be fixed by using two `sync.WaitGroup`s.

[NO NEW TESTS NEEDED]

Fixes #13388

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-18 14:28:54 +00:00
c99f9f1b69 Merge pull request #13547 from cevich/rhel_backport_gvisor_url_fix
[v4.0-rhel] Backport: Fix windows win-sshproxy build
2022-03-18 10:19:46 +01:00
9a7c9ddffb Cirrus: Update base branch to v4.0-rhel
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-03-17 14:32:27 -04:00
ed21c8640d Fix windows win-sshproxy build
Github no longer supports the unauthenticated git protocol, so switch
to using https instead.

https://github.blog/2021-09-01-improving-git-protocol-security-github/

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-17 14:31:56 -04:00
9237d7500a [v4.0] Backport Set default rule at the head of dev config
Backports: #13421 Set default rule at the head of device configuration
by @hshiina

The default rule should be set at the head of device configuration.
Otherwise, rules for user devices are overridden by the default rule so
that any access to the user devices are denied.

This has been requested to backport and to include in RHEL 8.6 and 9.0.
The exception process is underway.

Addresses these BZs for the backport:

https://bugzilla.redhat.com/show_bug.cgi?id=2059296
https://bugzilla.redhat.com/show_bug.cgi?id=2062835

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
(cherry picked from commit 61f6e1300a770af58c43dd226ad6ebe68c5d1921)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-15 08:29:31 -04:00
342c825938 Bump to v4.0.2
[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
v4.0.2
2022-03-02 09:04:36 -05:00
bd5ff1c32c Update release notes for v4.0.2
[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-02 09:04:05 -05:00
965d28024c Merge pull request #13392 from baude/v4reverts
V4reverts
2022-03-01 16:50:38 -05:00
791c8c347c Revert "use GetRuntimeDir() from c/common"
This reverts commit fc5cf812c81a10f8a021aae11df5f12ab2a6f6f6.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-03-01 13:24:39 -06:00
cc4a70c806 Revert "Option --url and --connection should imply --remote."
This reverts commit ca980c2e024bd33f4be3a33bb1dbb22c86bfe072.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-03-01 13:15:03 -06:00
cff448be2d Merge pull request #13357 from Romain-Geissler-1A/backport-connection-implies-remote
Option --url and --connection should imply --remote.
2022-02-28 18:45:18 -05:00
ca980c2e02 Option --url and --connection should imply --remote.
Closes #13242

Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2022-02-26 10:27:34 +00:00
49d511b6ee Merge pull request #13329 from mheon/bump_401
Bump to v4.0.1
2022-02-23 16:43:02 -05:00
cfcc0d6398 Bump to v4.0.2-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-02-23 14:35:14 -05:00
c8b9a2e3ec Bump to v4.0.1
Signed-off-by: Matthew Heon <mheon@redhat.com>
v4.0.1
2022-02-23 14:34:57 -05:00
b1ffa822f8 Update release notes for v4.0.1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-02-23 14:34:34 -05:00
de9f228052 Fix a potential flake in volume plugins tests
We could remove the container running the volume plugins, before
the containers using the volume plugins; this could cause
unmounting the volumes to fail because the plugin could not be
contacted.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-02-23 14:33:34 -05:00
697dd2890e Propagate $CONTAINERS_CONF to conmon
The CONTAINERS_CONF environment variable can be used to override the
configuration file, which is useful for testing.  However, at the moment
this variable is not propagated to conmon.  That means in particular, that
conmon can't propagate it back to podman when invoking its --exit-command.
The mismatch in configuration between the starting and cleaning up podman
instances can cause a variety of errors.

This patch also adds two related test cases.  One checks explicitly that
the correct CONTAINERS_CONF value appears in conmon's environment.  The
other checks for a possible specific impact of this bug: if we use a
nonstandard name for the runtime (even if its path is just a regular crun),
then the podman container cleanup invoked at container exit will fail.
That has the effect of meaning that a container started with -d --rm won't
be correctly removed once complete.

Fixes #12917

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-02-23 14:33:07 -05:00
c559e4e6fb tests: Remove inaccurate comment
This comment refers to overiding $PODMAN although the code below does
nothing of the sort.  Presumbly the comment has been outdated by altering
the containers.conf / $CONTAINERS_CONF instead.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-02-23 14:33:00 -05:00
3718d096b1 System tests: show one-line config overview
We're running into problems that are impossible to diagnose
because we have no idea if the SUT is using netavark or CNI.
We've previously run into similar problems with runc/crun,
or cgroups 1/2.

This adds a one-line 'echo' with important system info. Now,
when viewing a full test log, it will be possible to view
system settings in one glance.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-02-23 14:32:32 -05:00
e1d5c812d0 provide better error on invalid flag
Add a extra `See 'podman command --help'` to the error output.
With this patch you now get:
```
$ podman run -h
Error: flag needs an argument: 'h' in -h
See 'podman run --help'
```

Fixes #13082
Fixes #13002

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-23 14:32:05 -05:00
2b85f62a23 use GetRuntimeDir() from c/common
To prevent duplication and potential bugs we should use the same
GetRuntimeDir function that is used in c/common.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-23 14:31:39 -05:00
82f4760dea kube: honor --build=false and make --build=true by default
`podman play kube` tries to build images even if `--build` is set to
false so lets honor that and make `--build` , `true` by default so it
matches the original behviour.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-02-23 14:30:25 -05:00
e356dfe06b system tests: cleanup networks on teardown
When a test which creates a network fail it will not remove the network.
The teardown logic should remove the networks. Since there is no --all
option for network rm we use network prune --force.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-23 14:30:02 -05:00
71b0909f2d Remove the runtime lock
This primarily served to protect us against shutting down the
Libpod runtime while operations (like creating a container) were
happening. However, it was very inconsistently implemented (a lot
of our longer-lived functions, like pulling images, just didn't
implement it at all...) and I'm not sure how much we really care
about this very-specific error case?

Removing it also removes a lot of potential deadlocks, which is
nice.

[NO NEW TESTS NEEDED]

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-02-23 14:29:41 -05:00
ee7cf3cc2c Don't log errors on removing volumes inuse, if container --volumes-from
When removing a container created with a --volumes-from a container
created with a built in volume, we complain if the original container
still exists.  Since this is an expected state, we should not complain
about it.

Fixes: https://github.com/containers/podman/issues/12808

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-02-23 14:27:52 -05:00
eb9fe52a55 kube: honor mount propagation mode
convert the propagation mode specified for the mount to the expected
Linux mount option.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-02-23 14:26:10 -05:00
a0c34d64a5 Load ip_tables modules at boot
Rootless users cannot load the ip_tables module, in fedora 36 this
module is no longer loaded by default so we have to add it manually.
This is needed because rootless network setup tries to use iptables
and if iptables-legacy is used instead of iptables-nft it will fail.

To provide a better user experience we will load the module at boot.

Note that this is not needed for RHEL because iptables-legacy is not
supported on RHEL 8 and newer.

[NO NEW TESTS NEEDED]

Fixes #12661

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-02-23 14:25:09 -05:00
172b745d0e Merge pull request #13251 from cevich/new_4.0_vm_images
[v4.0] Cirrus: Update VM Images for 4.0 release
2022-02-19 22:51:31 -05:00
e8d7e580a9 Cirrus: Disable F34 aka prior-fedora testing
Podman 4.0 will never be supported in F34, and the use of F35 in CI is
temporary until F36 is brought up to speed.  Rather than fight with
testing issues that will never be fixed/supported, simply disable it.
This commit may be reverted at a future date when F36 VM support is
added.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-17 16:37:48 -05:00
7b106f5b6b Cirrus: Update VM Images for 4.0 release
This is to ensure VM images for CI, which contain the
intended dependency versions to support the podman
4.0 release.

Ref: https://github.com/containers/automation_images/pull/114

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-02-17 16:37:06 -05:00
93e8c39834 Merge pull request #13255 from mheon/bump_400_final
Bump to v4.0.0 final
2022-02-17 14:26:39 -05:00
d59749d64d Bump to v4.0.1-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-02-17 12:34:05 -05:00
49f8da7271 Bump to v4.0.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-02-17 12:34:05 -05:00
84c8870ac2 Release notes for v4.0.0 final
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
v4.0.0
2022-02-17 12:34:05 -05:00