cbcvebase.
CVE-2022-0847
published 2022-03-10

CVE-2022-0847: 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…

PriorityP194high7.8CVSS 3.1
AVLACLPRLUINSUCHIHAH
KEVITWEXPLOITRansomwareInitial access
CISA Known Exploited Vulnerabilitydue 2022-05-16
Exploited in the wild
EPSS
88.61%
99.8th percentile
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 in the Linux kernel and could thus contain stale values. An unprivileged local user could use this flaw to write to pages in the page cache backed by read only files and as such escalate their privileges on the system.

Affected

42 ranges· showing 25
VendorProductVersion rangeFixed in
debianlinux< linux 5.16.11-1 (bookworm)linux 5.16.11-1 (bookworm)
fedoraprojectfedora
googleandroid
linuxlinux_kernel
linuxlinux_kernel>= 0 < 5.10.92-25.10.92-2
linuxlinux_kernel>= 0 < 5.16.11-15.16.11-1
linuxlinux_kernel>= 0 < 5.16.11-15.16.11-1
linuxlinux_kernel>= 0 < 5.16.11-15.16.11-1
linuxlinux_kernel>= 5.15 < 5.15.255.15.25
linuxlinux_kernel>= 5.16 < 5.16.115.16.11
linuxlinux_kernel>= 5.8 < 5.10.1025.10.102
msrccbl2_kernel_5.15.26.1-1_on_cbl_mariner_2.0
ovirtovirt-engine
paloaltopan-os
redhatenterprise_linux
redhatenterprise_linux_eus
redhatenterprise_linux_eus
redhatenterprise_linux_for_ibm_z_systems
redhatenterprise_linux_for_ibm_z_systems_eus
redhatenterprise_linux_for_ibm_z_systems_eus
redhatenterprise_linux_for_power_little_endian
redhatenterprise_linux_for_power_little_endian_eus
redhatenterprise_linux_for_power_little_endian_eus
redhatenterprise_linux_for_real_time
redhatenterprise_linux_for_real_time_for_nfv

Detection & IOCsextracted from sources · hover to see the quote

path/etc/passwd
urlhttps://dirtypipe.cm4all.com/
urlhttps://haxx.in/files/dirtypipez.c
urlhttps://github.com/liamg/traitor
urlhttps://github.com/imfiver/CVE-2022-0847
urlhttps://github.com/rapid7/metasploit-framework/pull/16303
path/var/log/audit/audit.log
path/etc/audit/audit.rules
command-a always,exit -F arch=b64 -S splice -F a0=0x3 -F a2=0x5 -F a3=0x0 -F key=dirtypipe -a always,exit -F arch=b64 -S splice -F a0=0x6 -F a2=0x8 -F a3=0x0 -F key=dirtypipe -a always,exit -F arch=b64 -S splice -F a0=0x7 -F a2=0x9 -F a3=0x0 -F key=dirtypipe
path/var/log/auth.log
  • Monitor for the splice() syscall with specific argument combinations (a0=0x3/a2=0x5/a3=0x0, a0=0x6/a2=0x8/a3=0x0, a0=0x7/a2=0x9/a3=0x0) using Auditd rules tagged 'dirtypipe' to detect exploitation of the PIPE_BUF_FLAG_CAN_MERGE page-splicing technique.
  • Search /var/log/auth.log for the string '(to root) on none' to identify successful privilege escalation via CVE-2022-0847.
  • Alert on write or modification events targeting /etc/passwd from non-privileged processes, as most observed POCs overwrite this file to gain root.
  • Alert on SUID binary overwrites: exploitation variants inject malicious code into SUID root binaries (e.g., sudo) to create a root shell backdoor.
  • Use Kibana query 'event.dataset : "auditd.log"' to verify Auditd events are being collected for Dirty Pipe detection.
  • Hunt using Trend Micro Vision One OAT IDs: F5005 (Privilege Escalation Attempt), F011 (Modification of Linux Passwd File), F5025 (Exploitation of Dirty Pipe Vulnerability), F2745 (Unknown Process Launched From TMP Directory), F5012 (Arbitrary File Overwrite via CVE-2022-0847).
  • Flag processes launched from /tmp directories on Linux hosts as suspicious, as this is a known indicator of Dirty Pipe post-exploitation activity.
  • ·Exploitation does not always leave traces in auth.log; log-based detection alone is insufficient.
  • ·There are many ways to exploit this vulnerability without leaving a trace in the auth.log; defenders should not rely solely on auth.log monitoring.
  • ·Auditbeat conflicts with Auditd if both are running simultaneously; Auditd must be stopped and disabled before deploying Auditbeat for Dirty Pipe detection.
  • ·Affected kernel versions are 5.8 and later, up to (but not including) 5.16.11, 5.15.25, and 5.10.102; scope detection/patching accordingly.
  • ·Adversaries and researchers are expected to develop additional exploitation chains beyond the known /etc/passwd overwrite and SUID backdoor variants.

CVSS provenance

nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.2HIGHAV:L/AC:L/Au:N/C:C/I:C/A:C
osv7.8HIGH
vulncheck7.8HIGH
cisa7.8HIGH
vendor_debian7.8HIGH
vendor_msrc7.8HIGH
vendor_redhat7.8HIGH
vendor_ubuntu6.5MEDIUM
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.