Bug 1684607 (CVE-2019-3843) - CVE-2019-3843 systemd: services with DynamicUser can create SUID/SGID binaries
Summary: CVE-2019-3843 systemd: services with DynamicUser can create SUID/SGID binaries
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2019-3843
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: 1687512 1703356
Blocks: 1672544
TreeView+ depends on / blocked
 
Reported: 2019-03-01 16:04 UTC by Riccardo Schirone
Modified: 2021-02-16 22:18 UTC (History)
14 users (show)

Fixed In Version: systemd 242
Doc Type: If docs needed, set a value
Doc Text:
It was discovered that a systemd service that uses DynamicUser property can create a SUID/SGID binary that would be allowed to run as the transient service UID/GID even after the service is terminated. A local attacker may use this flaw to access resources that will be owned by a potentially different service in the future when the UID/GID will be recycled.
Clone Of:
Environment:
Last Closed: 2020-04-28 16:32:35 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:1794 0 None None None 2020-04-28 15:53:28 UTC

Description Riccardo Schirone 2019-03-01 16:04:35 UTC
It was discovered that a systemd service that uses DynamicUser property can create a SUID/SGID binary that would be allowed to run as the transient service UID/GID even after the service is terminated. A local attacker may use this flaw to access resources that will be owned by a potentially different service in the future, when the UID/GID will be recycled.

Comment 3 Riccardo Schirone 2019-03-05 12:46:49 UTC
A compromised or malicious service that uses DynamicUser property could leave on the filesystem a SUID/SGID binary that would allow other users to execute programs with the privileges of the transient user/group created by systemd. If the same UID/GID is reused by another service in the future, the SUID/SGID binary can be used to access the new service's resources.

Comment 5 Riccardo Schirone 2019-03-05 13:30:03 UTC
Statement:

This issue did not affect the versions of systemd as shipped with Red Hat Enterprise Linux 7 as they did not include support for DynamicUser property.

Comment 20 Riccardo Schirone 2019-04-26 08:41:18 UTC
Created systemd tracking bugs for this issue:

Affects: fedora-all [bug 1703356]

Comment 21 Zbigniew Jędrzejewski-Szmek 2019-04-26 10:58:21 UTC
https://github.com/systemd/systemd-stable/pull/54 contains a backport for v241-stable.

Comment 22 Riccardo Schirone 2019-04-26 13:38:59 UTC
Acknowledgments:

Name: Jann Horn (Google Project Zero)

Comment 23 errata-xmlrpc 2020-04-28 15:53:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:1794 https://access.redhat.com/errata/RHSA-2020:1794

Comment 24 Product Security DevOps Team 2020-04-28 16:32:35 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-2019-3843


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