Local root escalation via capability-preserving copy-up
Published Apr 1, 2022 · Updated Aug 3, 2024
Improper permission preservation in Linux Kernel OverlayFS through 5.17 allows local users to gain root via a crafted overlay mount. During copy_up, OverlayFS copies the lower file's security.capability extended attribute into the upper layer with the mounting task's credentials, even when the lower filesystem is mounted nosuid. The path requires a writable overlay whose nosuid lower layer contains a capability-bearing executable; the upstream maintainer describes this as intended administrator-controlled behavior.
Summary
What happened
Improper permission preservation in Linux Kernel OverlayFS through 5.17 allows local users to gain root via a crafted overlay mount. During copy_up, OverlayFS copies the lower file's security.capability extended attribute into the upper layer with the mounting task's credentials, even when the lower filesystem is mounted nosuid. The path requires a writable overlay whose nosuid lower layer contains a capability-bearing executable; the upstream maintainer describes this as intended administrator-controlled behavior.
The record
- CVE
- CVE-2021-3847
- Published
- Apr 1, 2022
- Updated
- Aug 3, 2024
- Vendor
- The Linux Kernel Organization
- Product
- Linux Kernel
- Classifications
- CWE-281, T1068
- Attack vector
- local
- Privileges
- Unavailable
Timeline
How it unfolded
- Apr 1, 2022CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=all versions up to, including, kernel 5.17
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- OverlayFS copy_up capability-preservation demonstrationproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo