Bug 2066839 (CVE-2022-27652) - CVE-2022-27652 cri-o: Default inheritable capabilities for linux container should be empty
Summary: CVE-2022-27652 cri-o: Default inheritable capabilities for linux container sh...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2022-27652
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2070104 2070105 2070106 2070107 2070108 2070109 2070110 2070111 2070112 2076264 2076265 2101429 2102503 2107176
Blocks: 2064591 2070126
TreeView+ depends on / blocked
 
Reported: 2022-03-22 15:20 UTC by Pedro Sampaio
Modified: 2022-10-12 13:12 UTC (History)
17 users (show)

Fixed In Version: cri-o v 1.24.0
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in cri-o, where containers were incorrectly started with non-empty default permissions. A vulnerability was found in Moby (Docker Engine) where containers started incorrectly with non-empty inheritable Linux process capabilities. This flaw allows an attacker with access to programs with inheritable file capabilities to elevate those capabilities to the permitted set when execve(2) runs.
Clone Of:
Environment:
Last Closed: 2022-05-02 22:45:20 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:1600 0 None None None 2022-05-02 18:21:23 UTC

Description Pedro Sampaio 2022-03-22 15:20:12 UTC
A bug was found in Moby (Docker Engine) where containers were incorrectly started with non-empty inheritable Linux process capabilities, creating an atypical Linux environment and enabling programs with inheritable file capabilities to elevate those capabilities to the permitted set during execve(2). Normally, when executable programs have specified permitted file capabilities, otherwise unprivileged users and processes can execute those programs and gain the specified file capabilities up to the bounding set. Due to this bug, containers which included executable programs with inheritable file capabilities allowed otherwise unprivileged users and processes to additionally gain these inheritable file capabilities up to the container's bounding set. Containers which use Linux users and groups to perform privilege separation inside the container are most directly impacted.

This bug did not affect the container security sandbox as the inheritable set never contained more capabilities than were included in the container's bounding set.

Patches
This bug has been fixed in Moby (Docker Engine) 20.10.14. Users should update to this version as soon as possible. Running containers should be stopped, deleted, and recreated for the inheritable capabilities to be reset.

This fix changes Moby (Docker Engine) behavior such that containers are started with a more typical Linux environment. Refer to capabilities(7) for a description of how capabilities work. Note that permitted file capabilities continue to allow for privileges to be raised up to the container's bounding set and that processes may add capabilities to their own inheritable set up to the container's bounding set per the rules described in the manual page. In all cases the container's bounding set provides an upper bound on the capabilities that can be assumed and provides for the container security sandbox.

Workarounds
The entrypoint of a container can be modified to use a utility like capsh(1) to drop inheritable capabilities prior to the primary process starting.

Comment 3 Avinash Hanwate 2022-03-30 12:38:31 UTC
Created cri-o tracking bugs for this issue:

Affects: fedora-all [bug 2070107]


Created cri-o:1.17/cri-o tracking bugs for this issue:

Affects: fedora-all [bug 2070112]


Created cri-o:1.18/cri-o tracking bugs for this issue:

Affects: fedora-all [bug 2070104]


Created cri-o:1.19/cri-o tracking bugs for this issue:

Affects: fedora-all [bug 2070111]


Created cri-o:1.20/cri-o tracking bugs for this issue:

Affects: fedora-all [bug 2070105]


Created cri-o:1.21/cri-o tracking bugs for this issue:

Affects: fedora-all [bug 2070108]


Created cri-o:1.22/cri-o tracking bugs for this issue:

Affects: fedora-all [bug 2070109]


Created cri-o:nightly/cri-o tracking bugs for this issue:

Affects: fedora-all [bug 2070110]

Comment 5 errata-xmlrpc 2022-05-02 18:21:20 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.10

Via RHSA-2022:1600 https://access.redhat.com/errata/RHSA-2022:1600

Comment 6 Product Security DevOps Team 2022-05-02 22:45:18 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-27652


Note You need to log in before you can comment on or make changes to this bug.