# CVE-2022-0847: Linux Kernel Privilege Escalation

> An unprivileged local user can escalate privileges by exploiting uninitialized pipe buffer flags to write to read-only page cache files.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 25 Apr 2022 (CISA KEV)
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Mar 2022
- **Updated:** 21 Oct 2025
- **Also known as:** A-220741611, ASB-A-220741611, AZL-8900, CLSA-2022-1648067859, CLSA-2022-1648068022, DEBIAN-CVE-2022-0847, RHSA-2022:0822, RHSA-2022:0831, UBUNTU-CVE-2022-0847

## What is CVE-2022-0847?

CVE-2022-0847 is a high-severity vulnerability in Fedoraproject Fedora, published on 7 Mar 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official 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.

Weakness: CWE-665 (Improper Initialization)

## Which versions are affected by CVE-2022-0847?

It affects 29 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bpftool` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `bpftool-debuginfo` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-abi-stablelists` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-core` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debug` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debug-core` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debug-debuginfo` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debug-devel` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debug-modules` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debug-modules-extra` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debuginfo` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debuginfo-common-aarch64` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debuginfo-common-ppc64le` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debuginfo-common-s390x` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debuginfo-common-x86_64` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-devel` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-doc` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-modules` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-modules-extra` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-tools` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-tools-debuginfo` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-tools-libs` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-zfcpdump` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-zfcpdump-core` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-zfcpdump-debuginfo` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-zfcpdump-devel` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-zfcpdump-modules` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-zfcpdump-modules-extra` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `perf` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `perf-debuginfo` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `python3-perf` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `python3-perf-debuginfo` | Red Hat:rhel_eus:8.4::baseos | All versions | 0:4.18.0-305.40.2.el8_4 |
| `bpftool-debuginfo` | Red Hat:rhel_eus:8.4::crb | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debug-debuginfo` | Red Hat:rhel_eus:8.4::crb | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debuginfo` | Red Hat:rhel_eus:8.4::crb | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debuginfo-common-aarch64` | Red Hat:rhel_eus:8.4::crb | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debuginfo-common-ppc64le` | Red Hat:rhel_eus:8.4::crb | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-debuginfo-common-x86_64` | Red Hat:rhel_eus:8.4::crb | All versions | 0:4.18.0-305.40.2.el8_4 |
| `kernel-tools-debuginfo` | Red Hat:rhel_eus:8.4::crb | All versions | 0:4.18.0-305.40.2.el8_4 |

Products: Fedoraproject Fedora, Linux kernel, Netapp H300e Firmware, Netapp H300s Firmware, Netapp H410c Firmware, Netapp H410s Firmware, Netapp H500e Firmware, Netapp H500s Firmware, Netapp H700e Firmware, Netapp H700s Firmware, Ovirt Ovirt-Engine, Redhat Codeready Linux Builder, Redhat Enterprise Linux, Redhat Enterprise Linux Eus, Redhat Enterprise Linux for Ibm Z Systems, Redhat Enterprise Linux for Ibm Z Systems Eus, Redhat Enterprise Linux for Power Little Endian, Redhat Enterprise Linux for Power Little Endian Eus, Redhat Enterprise Linux for Real Time, Redhat Enterprise Linux for Real Time for Nfv and 9 more.

## How do I fix CVE-2022-0847?

Apply the vendor's patch. US federal agencies must fix it by 16 May 2022.

## Is CVE-2022-0847 being exploited?

Yes. Attackers have exploited CVE-2022-0847 in the wild since at least 25 Apr 2022.

Public exploit code:

- A root exploit for CVE-2022-0847 (Dirty Pipe) (github_poc): https://github.com/Arinerron/CVE-2022-0847-DirtyPipe-Exploit
- A collection of exploits and documentation that can be used to exploit the Linux Dirty Pipe vulnerability. (github_poc): https://github.com/AlexisAhmed/CVE-2022-0847-DirtyPipe-Exploits
- CVE-2022-0847-DirtyPipe-Exploit   CVE-2022-0847 是存在于 Linux内核 5.8 及之后版本中的本地提权漏洞。攻击者通过利用此漏洞，可覆盖重写任意可读文件中的数据，从而可将普通权限的用户提升到特权 root。    CVE-2022-0847 的漏洞原理类似于 CVE-2016-5195 脏牛漏洞（Dirty Cow），但它更容易被利用。漏洞作者将此漏洞命名为“Dirty Pipe” (github_poc): https://github.com/r1is/CVE-2022-0847
- CVE-2022-0847 (github_poc): https://github.com/Al1ex/CVE-2022-0847
- Container Excape PoC for CVE-2022-0847 "DirtyPipe" (github_poc): https://github.com/DataDog/dirtypipe-container-breakout-poc
- Bash script to check for CVE-2022-0847 "Dirty Pipe" (github_poc): https://github.com/basharkey/CVE-2022-0847-dirty-pipe-checker

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-0847 and fix it if it is affected.

What it is: CVE-2022-0847 is a high-severity vulnerability in Fedoraproject Fedora, published on 7 Mar 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2022-0847 in the wild since at least 25 Apr 2022.

Affected product: Fedoraproject Fedora. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-0847/ (Markdown: https://insights.sbomify.com/CVE-2022-0847/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-0847
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-0847
- OSV: https://osv.dev/vulnerability/CVE-2022-0847

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-0847/
Summaries are generated and may contain mistakes; the official description above is the record.
