Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
Dirty Pipe, CVE-2022-0847, let any Linux user overwrite data in read-only files through an uninitialised pipe buffer flag. It was simpler and more reliable than Dirty COW.

What Is Dirty Pipe?
Dirty Pipe is CVE-2022-0847, a Linux kernel vulnerability disclosed on 7 March 2022 by Max Kellermann of CM4all. It allows an unprivileged local user to overwrite data in files they can only read, which is enough to take root on most systems. The name deliberately echoes Dirty COW, and the outcome is similar, but the mechanism is cleaner and the exploit is far easier to write.
Kellermann’s account of the discovery is one of the better pieces of public vulnerability writing. His company’s web hosting platform kept producing corrupted log files: compressed archives whose final bytes were wrong, in a pattern that looked random but recurred. Over several months he traced it from a support ticket, through gzip headers, to a splice operation in the kernel. The bug was not found by fuzzing or by auditing; it was found by refusing to dismiss intermittent data corruption as a hardware fault.
Linux pipes are implemented as a ring of pipe_buffer structures, each pointing at a page of memory and carrying a set of flags. One of those flags, PIPE_BUF_FLAG_CAN_MERGE, indicates that a subsequent write may be merged into the existing page rather than allocating a new one. It was introduced in kernel 5.8, released in August 2020, as part of a performance refactor.
The refactor missed one initialisation. When a page was added to a pipe by splice() — which maps a page of the page cache into the pipe without copying it — the flags field retained whatever value it held from a previous use of that buffer structure. An attacker could arrange for PIPE_BUF_FLAG_CAN_MERGE to be set, then splice a page of a read-only file into the pipe, then write to the pipe. The kernel merged the write into the spliced page, which was the page cache entry for the file. The file’s contents changed in memory for every process on the system.
The constraints are modest: the attacker needs read permission on the file, cannot modify the first byte of a page, cannot extend the file, and the change does not persist to disk. None of that matters when the target is a setuid binary or /etc/passwd, and working exploits appeared within a day.
Kernels from 5.8 onward are affected. Fixes landed in 5.16.11, 5.15.25, and 5.10.102, released at the end of February 2022, and distributions backported them promptly. Android devices on kernel 5.8 or later were also vulnerable, including the Pixel 6 and Galaxy S22, and Google shipped a fix in the May 2022 Android security bulletin.
Systems on long-term support kernels older than 5.8 — including many enterprise distributions at the time — were never vulnerable, which is a rare case of conservative kernel versions paying off.
Dirty Pipe is a textbook demonstration that a performance optimisation in memory management can become a universal local root. Three practical consequences follow.
Exploitation leaves little evidence, because the modification happens in the page cache rather than on disk and disappears on reboot. Practical monitoring focuses on the consequences: unexpected root shells, new setuid files, modifications to /etc/passwd or /etc/shadow detected by file integrity monitoring, and audit records of unusual splice() usage by processes that have no business performing it.
For hardening, keep kernels current and confirm the running version rather than the installed package, restrict interactive access to servers, apply seccomp and mandatory access control profiles, and separate tenants at a stronger boundary than namespaces where the workload justifies it.
Reviewing whether a local escalation would actually be reachable in your environment is part of our infrastructure security testing services.
Linux kernels from 5.8, released in August 2020, up to the fixes in 5.16.11, 5.15.25, and 5.10.102, published at the end of February 2022. Earlier long-term support kernels were never affected, because the flag involved did not exist before the 5.8 refactor. Verify the running kernel version rather than the installed package version.
Both let an unprivileged user write to read-only files, but Dirty COW exploited a race condition in copy-on-write handling and required precise timing, while Dirty Pipe exploited an uninitialised flag and is deterministic. That makes Dirty Pipe simpler, faster, and more reliable to exploit, with no risk of destabilising the system through repeated race attempts.
No. The modification affects the page cache in memory, not the file on disk, so the original contents return after a reboot or once the cache entry is evicted. This does not reduce the impact, because an attacker only needs the altered content to exist long enough to run a modified setuid binary or authenticate as root.
Yes, any device shipping a kernel of 5.8 or later, which included the Pixel 6 and Galaxy S22 among others. Google addressed it in the May 2022 Android security bulletin. Older devices on earlier kernels were unaffected. As with Dirty COW, the practical problem was the number of handsets that receive updates slowly or not at all.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.