CVE-2022-0847
HIGHCVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
5Tags
Description
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.
Analysis
Linux kernel contains a flaw known as 'Dirty Pipe' where improper pipe buffer flag initialization allows unprivileged local users to overwrite read-only files, enabling trivial privilege escalation to root on Linux 5.8+.
Technical Context
The CWE-665 improper initialization in copy_page_to_iter_pipe and push_pipe leaves the PIPE_BUF_FLAG_CAN_MERGE flag set on newly allocated pipe buffers. When a pipe is spliced from a file, subsequent writes to the pipe overwrite the page cache of the source file, even if the file is read-only (owned by root with 0644 permissions).
Affected Products
['Linux kernel 5.8 through 5.16.10', 'Linux kernel 5.15.x before 5.15.25', 'Android 12 (kernel 5.10+)']
Remediation
Update Linux kernel to 5.16.11, 5.15.25, or 5.10.102+. For Android, apply the March 2022 security patch. Container environments must update the host kernel. Monitor for /etc/passwd and /etc/shadow modification attempts.
Priority Score
Share
External POC / Exploit Code
Leaving vuln.today