Dirty Pipe (CVE-2022-0847)
Created on 2025-07-11 20:52, updated on 2025-07-11 20:52, by Cédric BonhommeDirty Pipe (CVE-2022-0847) is a vulnerability in the Linux kernel which allows an attacker to overwrite files that they have read-only access to. At the time of writing, this vulnerability is 3 years old, but overwriting nearly any file without appropriate permissions using only a few system calls stood out to me. Additionally, since the exploit abuses normal kernel behavior, detecting the exploit is not an easy task.
CVE-2022-0847 affects the following Linux kernel versions, according to NIST’s NVD:
- From 5.8 up to (but not including) 5.10.102
- From 5.15 up to (but not including) 5.15.25
- From 5.16 up to (but not including) 5.16.11
The vulnerability can be weaponized to escalate privileges on older Linux systems due to the arbitrary file overwrite. It abuses a flaw in functions in the Linux kernel that allowed pipes to contain stale flag values. Because of this, a pipe could be used to write to pages in the kernel page cache, which in turn could write arbitrarily to files the user does not have write permission for.
Related vulnerabilities
Meta
[
{
"ref": [
"https://morgenm.github.io/blog/2025/dirtypipe/"
]
}
]