Bug 2066837 (CVE-2022-24769) - CVE-2022-24769 moby: Default inheritable capabilities for linux container should be empty
Summary: CVE-2022-24769 moby: Default inheritable capabilities for linux container sho...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2022-24769
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: 2067529 2067590 2067591 2067592 2067593 2067594 2067595 2067596 2067597 2067598 2067599 2067600 2067601 2067606 2067607 2067608 2067609 2067610 2067611 2067612 2067613 2067614 2067615 2067616 2067617 2067618 2067619 2067620 2067621 2067622 2067623 2067624 2067625 2067626 2067627 2067628 2067629 2067630 2067631 2067632 2067633 2067634 2067635 2067636 2067637 2067638 2067639 2067640 2067641 2067642 2067643 2067644 2067645 2067646 2067647 2067648 2067649 2067650 2067651 2067652 2067653 2067654 2067655 2067656 2067657 2067658 2067659 2067660 2067661 2067662 2067663 2067664 2067665 2067666 2067667 2067668 2067669 2067670 2067671 2067672 2067673 2067674 2067675 2067676 2067677 2067678 2067679 2067680 2067681 2067682 2067683 2067684 2067685 2067686 2067687 2067688 2067689 2067690 2067691 2067692 2067693 2067694 2067695 2067696 2067697 2067698 2067699 2067700 2067701 2067702 2067703 2067948 2067949 2068094
Blocks: 2064591
TreeView+ depends on / blocked
 
Reported: 2022-03-22 15:17 UTC by Pedro Sampaio
Modified: 2022-08-09 06:07 UTC (History)
37 users (show)

Fixed In Version: moby 20.10.14
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Moby (Docker Engine), where containers were 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. Containers using Linux users and groups to perform privilege separation inside the container are most directly impacted.
Clone Of:
Environment:
Last Closed: 2022-04-20 17:27:00 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:1357 0 None None None 2022-04-20 11:41:36 UTC
Red Hat Product Errata RHSA-2022:1363 0 None Waiting on Red Hat OpenShift Scaleup playbook fails at "Approve node certificates when bootstrapping" task _Time 2022-04-22 14:26:36 UTC
Red Hat Product Errata RHSA-2022:1370 0 None None None 2022-04-20 12:19:12 UTC
Red Hat Product Errata RHSA-2022:1622 0 None None None 2022-05-04 09:07:21 UTC
Red Hat Product Errata RHSA-2022:1699 0 None None None 2022-05-12 18:05:30 UTC
Red Hat Product Errata RHSA-2022:2265 0 None None None 2022-05-26 20:06:45 UTC

Description Pedro Sampaio 2022-03-22 15:17:18 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.

References:

https://github.com/moby/moby/security/advisories/GHSA-2mm7-x5h6-5pvq

Comment 18 errata-xmlrpc 2022-04-20 11:41:33 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.10

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

Comment 19 errata-xmlrpc 2022-04-20 12:19:08 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.8

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

Comment 20 errata-xmlrpc 2022-04-20 14:44:35 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.9

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

Comment 21 Product Security DevOps Team 2022-04-20 17:26:56 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-24769

Comment 23 errata-xmlrpc 2022-05-04 09:07:18 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.6

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

Comment 24 errata-xmlrpc 2022-05-12 18:05:28 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.7

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

Comment 27 errata-xmlrpc 2022-05-26 20:06:41 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.6

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


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