# CVE-2022-0185: Linux Kernel Heap-Based Buffer Overflow

> A heap-based buffer overflow in the Linux kernel allows local attackers to escalate privileges via filesystem context parameters.

- **Severity:** High 8.4 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 21 Aug 2024 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 11 Feb 2022
- **Updated:** 21 Oct 2025
- **Also known as:** A-213172369, AZL-8578, DEBIAN-CVE-2022-0185, LSN-0084-1, MGASA-2022-0026, MGASA-2022-0027, PUB-A-213172369, SUSE-SU-2022:0239-1, SUSE-SU-2022:0262-1, UBUNTU-CVE-2022-0185, USN-5240-1, openSUSE-SU-2024:11775-1

## What is CVE-2022-0185?

CVE-2022-0185 is a high-severity memory corruption vulnerability in Linux kernel, published on 11 Feb 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A heap-based buffer overflow flaw was found in the way the legacy_parse_param function in the Filesystem Context functionality of the Linux kernel verified the supplied parameters length. An unprivileged (in case of unprivileged user namespaces enabled, otherwise needs namespaced CAP_SYS_ADMIN privilege) local user able to open a filesystem that does not support the Filesystem Context API (and thus fallbacks to legacy handling) could use this flaw to escalate their privileges on the system.

Weakness: CWE-191 (Integer Underflow (Wrap or Wraparound)), CWE-190 (Integer Overflow or Wraparound)

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

It affects 9 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `kernel-livepatch-SLE15-SP2_Update_21` | SUSE:Linux Enterprise Live Patching 15 SP2 | All versions | 3-2.2 |
| `kernel-livepatch-SLE15-SP2_Update_22` | SUSE:Linux Enterprise Live Patching 15 SP2 | All versions | 2-2.2 |
| `kernel-livepatch-SLE15-SP3_Update_10` | SUSE:Linux Enterprise Live Patching 15 SP3 | All versions | 2-150300.2.2 |
| `kernel-livepatch-SLE15-SP3_Update_11` | SUSE:Linux Enterprise Live Patching 15 SP3 | All versions | 2-150300.2.2 |
| `kernel-livepatch-SLE15-SP3_Update_9` | SUSE:Linux Enterprise Live Patching 15 SP3 | All versions | 3-150300.2.2 |
| `kernel-source` | openSUSE:Tumbleweed | All versions | 5.16.2-1.1 |

Products: 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.

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

Apply the vendor's patch. US federal agencies must fix it by 11 Sep 2024.

## Is CVE-2022-0185 being exploited?

Yes. Attackers have exploited CVE-2022-0185 in the wild since at least 21 Aug 2024.

Public exploit code:

- CVE-2022-0185 (github_poc): https://github.com/Crusaders-of-Rust/CVE-2022-0185
- CVE-2022-0185 POC and Docker and Analysis write up (github_poc): https://github.com/chenaotian/CVE-2022-0185
- CVE-2022-0185 exploit rewritten with pipe primitive (github_poc): https://github.com/veritas501/CVE-2022-0185-PipeVersion
- https://github.com/discordianfish/cve-2022-0185-crash-poc (github_poc): https://github.com/discordianfish/cve-2022-0185-crash-poc
- CVE-2022-0185 exploit (github_poc): https://github.com/featherL/CVE-2022-0185-exploit
- https://github.com/dcheng69/CVE-2022-0185-Case-Study (github_poc): https://github.com/dcheng69/CVE-2022-0185-Case-Study

## Other vulnerabilities in Linux kernel

- [CVE-2026-53266](https://insights.sbomify.com/CVE-2026-53266/): Linux Kernel Out-of-Bounds Write (high 8.8, exploited in the wild)
- [CVE-2013-6282](https://insights.sbomify.com/CVE-2013-6282/): Linux Kernel Improper Input Validation (high 8.8, exploited in the wild)
- [CVE-2013-2094](https://insights.sbomify.com/CVE-2013-2094/): Linux Kernel Privilege Escalation (high 8.4, exploited in the wild)
- [CVE-2026-53362](https://insights.sbomify.com/CVE-2026-53362/): Linux Kernel Unspecified (high 7.8, exploited in the wild)
- [CVE-2026-46300](https://insights.sbomify.com/CVE-2026-46300/): Linux Kernel Missing Initialization of a Variable (high 7.8, exploited in the wild)

## Fix prompt for AI coding agents

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

What it is: CVE-2022-0185 is a high-severity memory corruption vulnerability in Linux kernel, published on 11 Feb 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-0185 in the wild since at least 21 Aug 2024.

Affected product: Linux kernel. 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-0185/ (Markdown: https://insights.sbomify.com/CVE-2022-0185/index.md)
```

## Sources

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

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