Privilege retention via DynamicUser UID/GID recycling in systemd
CVE-2019-3843 is a local privilege and access control flaw in systemd affecting services that use the DynamicUser feature. A service configured with DynamicUser can create a SUID or SGID binary that remains executable with the transient service UID or GID even after the service terminates. Because DynamicUser identities are temporary and may later be recycled for a different service, a previously created privileged binary can be used to execute with a reused service identity and thereby cross service isolation boundaries. The issue stems from improper handling of privilege-bearing files created under transient identities, allowing privilege retention beyond the intended lifetime of the dynamic account.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can allow a local attacker to retain access to a transient service identity after the original service has exited and then abuse later UID or GID reuse. This can result in unauthorized access to files, IPC objects, or other resources owned by a different service that is subsequently assigned the recycled identity. Depending on how the affected services are configured, the flaw may enable privilege escalation within the local system context and compromise isolation guarantees between services using DynamicUser.
If you can’t patch tonight, do this now.
Where immediate patching is not possible, reduce exposure by disabling or avoiding DynamicUser for services that can create or modify executable files with SUID or SGID permissions, restricting write access to locations where such files could be placed, and auditing systems for leftover privileged binaries associated with transient service execution. Additional hardening should include minimizing the ability of local users or service processes to create privilege-bearing executables and monitoring for unexpected SUID or SGID files created by services.
Patch, then assume compromise.
Update systemd to a version that includes the fix for CVE-2019-3843. In addition, review services that use DynamicUser and ensure they do not leave behind SUID or SGID executables or other privilege-bearing artifacts in writable locations. Remove any such residual files created by transient service accounts and validate that service packaging and runtime behavior do not permit persistence of executables with elevated permission bits across service termination.
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
1 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.