CVE-2022-0185 is a heap-based buffer overflow in the Linux kernel's Filesystem Context code (legacy_parse_param) that lets a local user gain root, without privileges where unprivileged user namespaces are enabled. NVD scores it 8.4 and CISA lists it as exploited. Kernels 5.4.173, 5.10.93, 5.15.16 and 5.16.2 fix it.
Vulnerability summary
CVSS base score
8.4
High severity
EPSS score (FIRST)
25.2%
Probability of exploitation in the wild in the next 30 days
CISA KEV catalog
Yes
Listed as known exploited
Published
Vulnerability ID: CVE-2022-0185 · Source: NVD
Affected components
| Component | CPE | Version range |
|---|---|---|
| Linux kernel (VFS Filesystem Context, fs/fs_context.c) | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.1 to before 5.4.173, 5.5 to before 5.10.93, 5.11 to before 5.15.16, 5.16 to before 5.16.2 (NVD) |
What does this mean for affected devices?
CVE-2022-0185 is a heap-based buffer overflow in the Linux kernel's Filesystem Context code. Red Hat, the CNA, describes a flaw in how legacy_parse_param "verified the supplied parameters length": a local user able to open a filesystem that does not support the Filesystem Context API, and so falls back to legacy handling, could use it to escalate privileges. Where unprivileged user namespaces are enabled, no privilege is needed; otherwise the attacker needs CAP_SYS_ADMIN inside a namespace. NVD's Primary CVSS 3.1 score is 8.4, CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, its Primary NVD CVSS v2 score is 7.2, and NVD assigns CWE-191 (integer underflow); Red Hat's record uses CWE-190 (integer overflow), and CISA's ADP container gives the same 8.4 (NVD, CVE record).
Which kernel versions are affected?
NVD's CPE data covers Linux 5.1 to before 5.4.173, 5.5 to before 5.10.93, 5.11 to before 5.15.16, and 5.16 to before 5.16.2. The fix is mainline commit 722d94847de2, "vfs: fs_context: fix up param length parsing in legacy_parse_param", merged on 2022-01-18. Its message explains that PAGE_SIZE - 2 - size is unsigned, so a large size produced a high positive value instead of a negative one; the fix removes the subtraction. It changes only fs/fs_context.c, which is core filesystem code, so no kernel configuration option removes it.
Which devices are affected?
Any embedded Linux product on a 5.1 or later kernel older than the fixed releases above: the 5.4, 5.10 and 5.15 long-term branches are common in board-support packages for gateways, routers, HMIs and edge appliances. The risk is highest on devices that run third-party apps or containers, since the flaw needs local code execution and is easiest to reach where unprivileged user namespaces are enabled. CVE-2022-0492, a KEV-listed cgroups flaw from the same period, is another container-escape path for the same device class. Our Linux kernel CVE triage guide explains how to check whether a vendor kernel carries a backport.
How do you fix CVE-2022-0185?
Update the kernel to at least 5.4.173, 5.10.93, 5.15.16 or 5.16.2, or to the latest release of its stable branch, or backport commit 722d94847de2. Until the fix is installed, keep untrusted code off the device; on kernels that support it, disabling unprivileged user namespaces means an attacker also needs namespaced CAP_SYS_ADMIN, per NVD's description. For the general approach to heap overflows in firmware, see how to fix memory corruption in embedded firmware.
Is CVE-2022-0185 exploited?
Yes. CISA added it to the KEV catalog on 2024-08-21 with a due date of 2024-09-11 and the required action "Apply updates per vendor instructions or discontinue use of the product if updates are unavailable"; known ransomware campaign use is listed as Unknown, as of 2026-11-25 (catalog version 2026.11.24). FIRST EPSS gives it 0.25151, the 98.0th percentile, in the 2026-11-24 dataset (CISA KEV, FIRST EPSS).
Evidence
- NVD: status Analyzed; [email protected] Primary CVSS 3.1 8.4 AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H; [email protected] Primary CVSS v2 7.2; CISA-ADP Secondary 8.4; CWE-191 (nvd Primary), CWE-190 (Red Hat Secondary); CPE linux_kernel 5.1-5.4.173, 5.5-5.10.93, 5.11-5.15.16, 5.16-5.16.2; published 2022-02-11; read 2026-11-25. — NVD
- CVE record (CNA redhat, PUBLISHED 2022-02-11): description of legacy_parse_param length check; unprivileged with unprivileged user namespaces, otherwise needs namespaced CAP_SYS_ADMIN; CWE-190; CISA ADP 8.4. — CVE.org
- Mainline commit 722d94847de2 'vfs: fs_context: fix up param length parsing in legacy_parse_param', committed 2022-01-18; 'The "PAGE_SIZE - 2 - size" calculation in legacy_parse_param() is an unsigned type...'; changes fs/fs_context.c only. — Linux kernel git
- CISA KEV catalog version 2026.11.24: Linux Kernel Heap-Based Buffer Overflow Vulnerability, dateAdded 2024-08-21, dueDate 2024-09-11, knownRansomwareCampaignUse Unknown, required action 'Apply updates per vendor instructions or discontinue use of the product if updates are unavailable.'; checked 2026-11-25. — CISA KEV
- EPSS 0.25151, percentile 0.97965, dataset 2026-11-24, read 2026-11-25. — FIRST EPSS

Related advisories
Sources
Frequently asked questions
Which kernel versions fix CVE-2022-0185?
5.4.173, 5.10.93, 5.15.16 and 5.16.2 on their stable branches; affected kernels start at 5.1 (per NVD's CPE data). The mainline fix is commit 722d94847de2.
Does CVE-2022-0185 need root or special privileges?
No privilege is needed where unprivileged user namespaces are enabled; otherwise the attacker needs CAP_SYS_ADMIN inside a namespace. Either way, the attacker must already run code on the device (per NVD's description).
Why does NVD score CVE-2022-0185 8.4 rather than 7.8?
NVD's vector sets Privileges Required to None (PR:N), reflecting the unprivileged user namespace case, which gives a higher score than a vector requiring a low-privileged account (PR:L) with the same impacts (per NVD's CVSS 3.1 vector).
Is CVE-2022-0185 exploited?
Yes. CISA added it to the KEV catalog on 2024-08-21 with a due date of 2024-09-11; ransomware use is listed as Unknown, as of 2026-11-25 (catalog version 2026.11.24, per CISA KEV).
Questions about this page?