Summary

A vulnerability within the Linux kernel since version 5.8 allows overwriting data in arbitrary read-only files. This leads to privilege escalation because unprivileged processes also can inject code into root processes. This local privilege escalation is similar but easy to take advantage of than previously released CVE-2016–5195 “Dirty Cow”. Security researcher Max Kellermann responsibly disclosed the ‘Dirty Pipe’ vulnerability and stated that it affects Linux Kernel 5.8 and later versions, even on Android devices.

Technical Details

A flaw was found in the way the “flags” member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe and push_pipe functions within the Linux kernel and could thus contain stale values. An unprivileged local user could use this flaw to write to pages within the page cache backed by read only files and as such escalate their privileges on the system. This flaw affects Linux kernel versions before 5.17-rc6.

Exploit in action

Exploit in action

References