diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-02-28 09:48:52 +0100 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2022-04-12 14:27:41 -0400 |
commit | 8292fc0a4447bd744d86938a76f53f9a3618987c (patch) | |
tree | c1c23781cfb9bf1b2ecd9ec9d9530bcadd1c0920 /test | |
parent | 02bd13031eaf7d62ab976aed1696726b6d055dbf (diff) | |
download | podman-8292fc0a4447bd744d86938a76f53f9a3618987c.tar.gz podman-8292fc0a4447bd744d86938a76f53f9a3618987c.tar.bz2 podman-8292fc0a4447bd744d86938a76f53f9a3618987c.zip |
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)
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index e21b1dcf3..39de470b5 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -454,7 +454,7 @@ var _ = Describe("Podman run", func() { session = podmanTest.Podman([]string{"run", "--rm", "--user", "root", ALPINE, "grep", "CapInh", "/proc/self/status"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - Expect(session.OutputToString()).To(ContainSubstring("00000000a80425fb")) + Expect(session.OutputToString()).To(ContainSubstring("0000000000000000")) session = podmanTest.Podman([]string{"run", "--rm", ALPINE, "grep", "CapBnd", "/proc/self/status"}) session.WaitWithDefaultTimeout() @@ -489,7 +489,7 @@ var _ = Describe("Podman run", func() { session = podmanTest.Podman([]string{"run", "--user=0:0", "--cap-add=DAC_OVERRIDE", "--rm", ALPINE, "grep", "CapInh", "/proc/self/status"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - Expect(session.OutputToString()).To(ContainSubstring("00000000a80425fb")) + Expect(session.OutputToString()).To(ContainSubstring("0000000000000000")) if os.Geteuid() > 0 { if os.Getenv("SKIP_USERNS") != "" { @@ -506,7 +506,7 @@ var _ = Describe("Podman run", func() { session = podmanTest.Podman([]string{"run", "--userns=keep-id", "--privileged", "--rm", ALPINE, "grep", "CapInh", "/proc/self/status"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - Expect(session.OutputToString()).To(ContainSubstring("0000000000000000")) + Expect(session.OutputToString()).To(ContainSubstring("0000000000000002")) session = podmanTest.Podman([]string{"run", "--userns=keep-id", "--cap-add=DAC_OVERRIDE", "--rm", ALPINE, "grep", "CapInh", "/proc/self/status"}) session.WaitWithDefaultTimeout() |