Dirty Pipe: CVE-2022–0847

Summary

Pradeep Bhattarai
CryptoGen Nepal
Published in
1 min readMar 9, 2022

--

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.

Read More: https://blog.pradeepbhattarai.me/dirty-pipe-a-critical-linux-kernel-vulnerability

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

· https://dirtypipe.cm4all.com/

· https://www.bitdefender.com/blog/hotforsecurity/researcher-discovers-new-critical-linux-kernel-dirty-pipe-vulnerability/

· https://socradar.io/dirty-pipe-linux-vulnerability-discovered/

--

--