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: Red Hat2067949 Red Hat2067529 Red Hat2067590 Red Hat2067591 Red Hat2067592 Red Hat2067593 Red Hat2067594 Red Hat2067595 Red Hat2067596 Red Hat2067597 Red Hat2067598 Red Hat2067599 Red Hat2067600 Red Hat2067601 Red Hat2067606 Red Hat2067607 Red Hat2067608 Red Hat2067609 Red Hat2067610 Red Hat2067611 Red Hat2067612 Red Hat2067613 Red Hat2067614 Red Hat2067615 Red Hat2067616 Red Hat2067617 Red Hat2067618 Red Hat2067619 Red Hat2067620 Red Hat2067621 Red Hat2067622 Red Hat2067623 Red Hat2067624 Red Hat2067625 Red Hat2067626 Red Hat2067627 Red Hat2067628 Red Hat2067629 Red Hat2067630 Red Hat2067631 Red Hat2067632 Red Hat2067633 Red Hat2067634 Red Hat2067635 Red Hat2067636 Red Hat2067637 Red Hat2067638 Red Hat2067639 Red Hat2067640 Red Hat2067641 Red Hat2067642 Red Hat2067643 Red Hat2067644 Red Hat2067645 Red Hat2067646 Red Hat2067647 Red Hat2067648 Red Hat2067649 Red Hat2067650 Red Hat2067651 Red Hat2067652 Red Hat2067653 Red Hat2067654 Red Hat2067655 Red Hat2067656 Red Hat2067657 Red Hat2067658 Red Hat2067659 Red Hat2067660 Red Hat2067661 Red Hat2067662 Red Hat2067663 Red Hat2067664 Red Hat2067665 Red Hat2067666 Red Hat2067667 Red Hat2067668 Red Hat2067669 Red Hat2067670 Red Hat2067671 Red Hat2067672 Red Hat2067673 Red Hat2067674 Red Hat2067675 Red Hat2067676 Red Hat2067677 Red Hat2067678 Red Hat2067679 Red Hat2067680 Red Hat2067681 Red Hat2067682 Red Hat2067683 Red Hat2067684 Red Hat2067685 Red Hat2067686 Red Hat2067687 Red Hat2067688 Red Hat2067689 Red Hat2067690 Red Hat2067691 Red Hat2067692 Red Hat2067693 Red Hat2067694 Red Hat2067695 Red Hat2067696 Red Hat2067697 Red Hat2067698 Red Hat2067699 Red Hat2067700 Red Hat2067701 Red Hat2067702 Red Hat2067703 Red Hat2067948 Red Hat2068094
Blocks: Embargoed2064591
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


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.