Skip to content

Commit f83adcc

Browse files
Merge pull request #13850 from mheon/bump_345
Bump to v3.4.5
2 parents 16f7a75 + 19b9f4c commit f83adcc

File tree

5 files changed

+23
-7
lines changed

5 files changed

+23
-7
lines changed

RELEASE_NOTES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release Notes
22

3+
## 3.4.5
4+
### Security
5+
- This release addresses CVE-2022-27649, where Podman would set excess inheritable capabilities for processes in containers.
6+
7+
### Bugfixes
8+
- Fixed a bug where the `podman images` command could, under some circumstances, take an excessive amount of time to list images ([#11997](https://github.com/containers/podman/issues/11997)).
9+
10+
### Misc
11+
- Updates the containers/common library to v0.44.5
12+
313
## 3.4.4
414
### Bugfixes
515
- Fixed a bug where the `podman exec` command would, under some circumstances, print a warning message about failing to move `conmon` to the appropriate cgroup ([#12535](https://github.com/containers/podman/issues/12535)).

libpod/oci_conmon_exec_linux.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,11 +757,14 @@ func prepareProcessExec(c *Container, options *ExecOptions, env []string, sessio
757757
} else {
758758
pspec.Capabilities.Bounding = ctrSpec.Process.Capabilities.Bounding
759759
}
760+
761+
// Always unset the inheritable capabilities similarly to what the Linux kernel does
762+
// They are used only when using capabilities with uid != 0.
763+
pspec.Capabilities.Inheritable = []string{}
764+
760765
if execUser.Uid == 0 {
761766
pspec.Capabilities.Effective = pspec.Capabilities.Bounding
762-
pspec.Capabilities.Inheritable = pspec.Capabilities.Bounding
763767
pspec.Capabilities.Permitted = pspec.Capabilities.Bounding
764-
pspec.Capabilities.Ambient = pspec.Capabilities.Bounding
765768
} else {
766769
if user == c.config.User {
767770
pspec.Capabilities.Effective = ctrSpec.Process.Capabilities.Effective

pkg/specgen/generate/security.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,17 @@ func securityConfigureGenerator(s *specgen.SpecGenerator, g *generate.Generator,
146146

147147
configSpec := g.Config
148148
configSpec.Process.Capabilities.Ambient = []string{}
149+
150+
// Always unset the inheritable capabilities similarly to what the Linux kernel does
151+
// They are used only when using capabilities with uid != 0.
152+
configSpec.Process.Capabilities.Inheritable = []string{}
149153
configSpec.Process.Capabilities.Bounding = caplist
150154

151155
user := strings.Split(s.User, ":")[0]
152156

153157
if (user == "" && s.UserNS.NSMode != specgen.KeepID) || user == "root" || user == "0" {
154158
configSpec.Process.Capabilities.Effective = caplist
155159
configSpec.Process.Capabilities.Permitted = caplist
156-
configSpec.Process.Capabilities.Inheritable = caplist
157160
} else {
158161
mergedCaps, err := capabilities.MergeCapabilities(nil, s.CapAdd, nil)
159162
if err != nil {
@@ -175,12 +178,12 @@ func securityConfigureGenerator(s *specgen.SpecGenerator, g *generate.Generator,
175178
}
176179
configSpec.Process.Capabilities.Effective = userCaps
177180
configSpec.Process.Capabilities.Permitted = userCaps
178-
configSpec.Process.Capabilities.Inheritable = userCaps
179181

180182
// Ambient capabilities were added to Linux 4.3. Set ambient
181183
// capabilities only when the kernel supports them.
182184
if supportAmbientCapabilities() {
183185
configSpec.Process.Capabilities.Ambient = userCaps
186+
configSpec.Process.Capabilities.Inheritable = userCaps
184187
}
185188
}
186189

test/e2e/run_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ var _ = Describe("Podman run", func() {
454454
session = podmanTest.Podman([]string{"run", "--rm", "--user", "root", ALPINE, "grep", "CapInh", "/proc/self/status"})
455455
session.WaitWithDefaultTimeout()
456456
Expect(session).Should(Exit(0))
457-
Expect(session.OutputToString()).To(ContainSubstring("00000000a80425fb"))
457+
Expect(session.OutputToString()).To(ContainSubstring("0000000000000000"))
458458

459459
session = podmanTest.Podman([]string{"run", "--rm", ALPINE, "grep", "CapBnd", "/proc/self/status"})
460460
session.WaitWithDefaultTimeout()
@@ -489,7 +489,7 @@ var _ = Describe("Podman run", func() {
489489
session = podmanTest.Podman([]string{"run", "--user=0:0", "--cap-add=DAC_OVERRIDE", "--rm", ALPINE, "grep", "CapInh", "/proc/self/status"})
490490
session.WaitWithDefaultTimeout()
491491
Expect(session).Should(Exit(0))
492-
Expect(session.OutputToString()).To(ContainSubstring("00000000a80425fb"))
492+
Expect(session.OutputToString()).To(ContainSubstring("0000000000000000"))
493493

494494
if os.Geteuid() > 0 {
495495
if os.Getenv("SKIP_USERNS") != "" {

version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const (
2727
// NOTE: remember to bump the version at the top
2828
// of the top-level README.md file when this is
2929
// bumped.
30-
var Version = semver.MustParse("3.4.5-dev")
30+
var Version = semver.MustParse("3.4.6-dev")
3131

3232
// See https://docs.docker.com/engine/api/v1.40/
3333
// libpod compat handlers are expected to honor docker API versions

0 commit comments

Comments
 (0)