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

Published Jan 13, 2022
·
Updated

A heap-based buffer overflow flaw was found in the way the legacyparseparam 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 CAPSYSADMIN 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.

Other sources

Linux kernel contains a heap-based buffer overflow vulnerability in the legacyparseparam function in the Filesystem Context functionality. This allows an attacker to open a filesystem that does not support the Filesystem Context API and ultimately escalate privileges.

CISA

Linux Kernel is vulnerable to a heap-based buffer overflow, caused by an integer underflow in the legacyparseparam function in fs/fscontext.c. By sending a specially-crafted request, a local authenticated attacker could overflow a buffer and execute arbitrary code on the system with root privileges.

IBM

Affected Software

43 affected componentsFixes available
redhat/kernel-rt<0:4.18.0-348.12.2.rt7.143.el8_5
0:4.18.0-348.12.2.rt7.143.el8_5
redhat/kernel<0:4.18.0-348.12.2.el8_5
0:4.18.0-348.12.2.el8_5
redhat/kernel-rt<0:4.18.0-305.34.2.rt7.107.el8_4
0:4.18.0-305.34.2.rt7.107.el8_4
redhat/kernel<0:4.18.0-305.34.2.el8_4
0:4.18.0-305.34.2.el8_4
IBM Planning Analytics Cartridge for IBM Cloud Pak for Data<=4.0
Linux Kernel
Linux Linux kernel>=5.1<5.4.173
Linux Linux kernel>=5.5<5.10.93
Linux Linux kernel>=5.11<5.15.16
Linux Linux kernel>=5.16<5.16.2
NetApp H410c Firmware
NetApp H410c
NetApp H300s Firmware
NetApp H300s
NetApp H500s Firmware
NetApp H500s
NetApp H700s Firmware
NetApp H700s
NetApp H300e Firmware
NetApp H300e
NetApp H500e Firmware
NetApp H500e
NetApp H700e Firmware
NetApp H700e
NetApp H410s Firmware
NetApp H410s
All of the following
NetApp H410c Firmware
NetApp H410c
All of the following
NetApp H300s Firmware
NetApp H300s
All of the following
NetApp H500s Firmware
NetApp H500s
All of the following
NetApp H700s Firmware
NetApp H700s
All of the following
NetApp H300e Firmware
NetApp H300e
All of the following
NetApp H500e Firmware
NetApp H500e
All of the following
NetApp H700e Firmware
NetApp H700e
All of the following
NetApp H410s Firmware
NetApp H410s
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/kernel-rt to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-348.12.2.rt7.143.el8_5
  2. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-348.12.2.el8_5
  3. Upgrade

    Upgrade redhat/kernel-rt to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-305.34.2.rt7.107.el8_4
  4. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-305.34.2.el8_4
  5. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1
  6. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1
  7. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.234-1
  8. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.129-1
  9. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.135-1
  10. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.25-1
  11. Configuration

    # echo "user.max_user_namespaces=0" > /etc/sysctl.d/userns.conf # sysctl -p /etc/sysctl.d/userns.conf Note: On containerized deployments (such as Red Hat OpenShift Container Platform) do not apply this mitigation because the functionality is required.

    Linux kernel (sysctl) user.max_user_namespaces = 0
  12. Configuration

    Run: sysctl -w kernel.unprivileged_userns_clone=0 Note: On containerized deployments (such as Red Hat OpenShift Container Platform) do not apply this mitigation because the functionality is required.

    Linux kernel (sysctl) kernel.unprivileged_userns_clone = 0

Event History

Jan 13, 2022
Data Sourced
via Red Hat·02:45 PM
DescriptionSeverityAffected Software
Jan 18, 2022
CVE Published
06:41 PM
Feb 11, 2022
CVE Published
via MITRE·05:40 PM
Data Sourced
via MITRE·05:40 PM
DescriptionWeakness
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 12, 2024
Data Sourced
via Launchpad·12:02 AM
Description
Mar 22, 2024
News Published
via The Register·10:02 PM
News Published
via The Register·10:06 PM
Aug 21, 2024
Known Exploited
via CISA·12:00 AM
May 6, 2025
Data Sourced
via Ubuntu·04:19 AM
RemedyDescriptionSeverityAffected Software

Peer vulnerabilities

Found alongside the following vulnerabilities.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2022-0185?

CVE-2022-0185 has been classified with a high severity rating due to the potential for heap-based buffer overflow which can lead to arbitrary code execution.

2

How do I fix CVE-2022-0185?

To address CVE-2022-0185, update your Linux kernel to versions 4.18.0-348.12.2.rt7.143.el8_5, 4.18.0-348.12.2.el8_5, or any subsequent unreleased patches.

3

What systems are affected by CVE-2022-0185?

CVE-2022-0185 affects various Linux kernel versions and specific Red Hat packages such as kernel-rt and kernel for versions up to 4.18.0-348.12.2.

4

Who can exploit CVE-2022-0185?

An unprivileged user may exploit CVE-2022-0185 if unprivileged user namespaces are enabled, allowing for unauthorized access to the affected systems.

5

Is CVE-2022-0185 easy to exploit?

Exploitation of CVE-2022-0185 can be relatively straightforward, as it may allow adversaries to execute arbitrary code with low complexity.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203