CVE-2021-22555
Linux Kernel Heap Out-of-Bounds Write Vulnerability
Description
CVE-2021-22555 is a heap out-of-bounds write vulnerability in the Linux Kernel's Netfilter subsystem, specifically within the net/netfilter/x_tables.c component. Present since Linux kernel version 2.6.19-rc1, this flaw allows a local attacker to escalate privileges or cause a denial of service through heap memory corruption by exploiting user namespaces. With an EPSS score of 0.85239 (99.3rd percentile), this vulnerability is almost certainly being targeted by attackers in the wild. It has been added to CISA's Known Exploited Vulnerabilities (KEV) catalog with a remediation deadline of October 27, 2025, underscoring the critical nature of this security issue.
KEV Information
CVSS Score
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:HOpen in CalculatorAffected Products
| Vendor | Product | Version |
|---|---|---|
| netapp | c400 firmware | - |
| netapp | c250 firmware | - |
| netapp | h410c firmware | - |
| netapp | h300s firmware | - |
| netapp | h500s firmware | - |
| netapp | h700s firmware | - |
| netapp | h410s firmware | - |
| linux | linux kernel | >= 2.6.19, < 4.4.267; >= 4.5, < 4.9.267; >= 4.10, < 4.14.231; >= 4.15, < 4.19.188; >= 4.20, < 5.4.113; >= 5.5, < 5.10.31; >= 5.11, < 5.12 |
| brocade | fabric operating system | - |
| netapp | fas 8300 firmware | - |
| netapp | fas 8700 firmware | - |
| netapp | aff a400 firmware | - |
| netapp | aff a250 firmware | - |
| netapp | aff 500f firmware | - |
| netapp | h610c firmware | - |
| netapp | h610s firmware | - |
| netapp | h615c firmware | - |
| netapp | cloud backup | - |
| netapp | hci management node | - |
| netapp | solidfire | - |
Multiple CVSS Assessments
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- http://packetstormsecurity.com/files/163528/Linux-Kernel-Netfilter-Heap-Out-Of-Bounds-Write.html(Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/163878/Kernel-Live-Patch-Security-Notice-LSN-0080-1.html(Exploit, Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/164155/Kernel-Live-Patch-Security-Notice-LSN-0081-1.html(Exploit, Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/164437/Netfilter-x_tables-Heap-Out-Of-Bounds-Write-Privilege-Escalation.html(Exploit, Third Party Advisory, VDB Entry)
- http://packetstormsecurity.com/files/165477/Kernel-Live-Patch-Security-Notice-LSN-0083-1.html(Exploit, Third Party Advisory, VDB Entry)
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/netfilter/x_tables.c?id=9fa492cdc160cd27ce1046cb36f47d3b2b1efa21(Mailing List, Patch, Vendor Advisory)
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/netfilter/x_tables.c?id=b29c457a6511435960115c0f548c4360d5f4801d(Mailing List, Patch, Vendor Advisory)
- https://github.com/google/security-research/security/advisories/GHSA-xxx5-8mvq-3528(Exploit, Third Party Advisory)
- https://security.netapp.com/advisory/ntap-20210805-0010/(Third Party Advisory)
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-22555(US Government Resource)
Weakness Type
CWE-787: Out-of-bounds Write
CWE-787 describes a condition where software writes data past the end or before the beginning of an intended buffer. In the case of CVE-2021-22555, the Linux kernel's Netfilter x_tables component performs a heap out-of-bounds write when processing certain compat structures. This class of vulnerability is particularly dangerous because it can corrupt adjacent memory structures, potentially allowing an attacker to overwrite function pointers or other critical data to hijack program execution flow. Out-of-bounds write vulnerabilities are among the most commonly exploited weakness types in system-level software.
Impact Analysis
The business impact of CVE-2021-22555 is severe, as it enables complete system compromise through privilege escalation. Confidentiality Impact is high because an attacker who successfully exploits this vulnerability can gain root-level access, enabling them to read any data on the system including credentials, encryption keys, and sensitive business information. Integrity Impact is equally high since root access allows modification of any system file, installation of backdoors, or tampering with audit logs to cover tracks. Availability Impact is also high as the vulnerability can be used to cause kernel crashes through heap corruption, leading to system-wide denial of service. The attack vector requires adjacent network access with high complexity, meaning the attacker needs to be on the same network segment, which somewhat limits exposure. However, no privileges or user interaction are required, and the scope is changed, meaning the vulnerability can affect resources beyond the vulnerable component. With an EPSS score of 0.85239 placing it in the 99.3rd percentile, this vulnerability is actively being exploited. Its presence in the KEV catalog with ransomware usage listed as "Unknown" means organizations should treat this as a priority remediation item, especially for any Linux servers exposed to untrusted network segments.
Exploit Maturity
CVE-2021-22555 has a highly mature exploit landscape. CISA has added this vulnerability to the Known Exploited Vulnerabilities catalog, confirming active exploitation in the wild with a remediation deadline of October 27, 2025. The ransomware association is currently listed as "Unknown." The EPSS score of 0.85239 (99.3rd percentile) indicates an extremely high probability of exploitation. Multiple public exploits are available, including privilege escalation proof-of-concept code published on Packet Storm Security and a detailed security advisory from Google Security Research that includes exploit details. Additional exploit references have been published through Kernel Live Patch notices (LSN-0080-1, LSN-0081-1, LSN-0083-1). The availability of working exploits, combined with the kernel-level nature of the vulnerability and its applicability to a wide range of Linux kernel versions, makes this an extremely high-risk issue that demands immediate attention.
Remediation
- Update the Linux kernel immediately. Patch to a fixed version: 4.4.267+ for the 4.4.x branch, 4.9.267+ for 4.9.x, 4.14.231+ for 4.14.x, 4.19.188+ for 4.19.x, 5.4.113+ for 5.4.x, 5.10.31+ for 5.10.x, or 5.12+ for the 5.11.x branch. Apply the upstream commits 9fa492cd and b29c457a if building from source.
- Apply kernel live patches if available. For systems that cannot undergo an immediate reboot, use kernel live patching solutions (such as KernelCare or Canonical Livepatch) to apply the fix without downtime. Multiple live patch advisories have been issued for this vulnerability.
- Restrict user namespace access. As a mitigation measure, disable unprivileged user namespaces by setting
kernel.unprivileged_userns_clone=0via sysctl. This significantly reduces the attack surface by preventing unprivileged users from creating the namespaces needed to exploit the Netfilter flaw. - Audit NetApp firmware if applicable. If running NetApp appliances (C400, C250, H410C, H300S, H500S, H700S, H410S), verify firmware is updated to versions that incorporate the kernel fix, as these products ship with affected Linux kernels.
- Monitor for exploitation indicators. Review system logs for unexpected privilege escalation events, unusual kernel crashes or panics, and unauthorized access patterns that could indicate exploitation of this vulnerability.
Technical Details
The CVSS v3.1 vector for CVE-2021-22555 is CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H, yielding a score of 8.3 (High). Attack Vector (AV:A) indicates the attacker must be on an adjacent network, meaning local network access is required rather than remote internet-based exploitation. Attack Complexity (AC:H) is high, reflecting that successful exploitation requires specific conditions to be met, such as the ability to create user namespaces and interact with the Netfilter subsystem in a particular way. Privileges Required (PR:N) is none, meaning no authentication is needed to begin the attack, though the attacker does need network adjacency. User Interaction (UI:N) confirms no victim action is needed. Scope (S:C) is changed, indicating the exploit can impact components beyond the vulnerable Netfilter subsystem, specifically enabling full kernel compromise. All three impact metrics — Confidentiality (C:H), Integrity (I:H), and Availability (A:H) — are rated high, reflecting complete system compromise potential.
The root cause lies in the xt_compat_target_from_user and xt_compat_match_from_user functions within net/netfilter/x_tables.c. When processing compat structures (used for 32-bit compatibility on 64-bit kernels), the code performs a heap buffer write that exceeds the allocated bounds. Specifically, the padding calculation for compat target and match structures does not properly account for the size difference between compat and native structures, leading to a write beyond the allocated slab object. An attacker can trigger this by creating Netfilter rules through user namespaces, carefully controlling the compat structure contents to corrupt adjacent heap objects. By targeting specific kernel objects in adjacent slab allocations, the attacker can overwrite function pointers to achieve arbitrary code execution in kernel context, resulting in full privilege escalation from an unprivileged user to root.
Frequently Asked Questions
How does CVE-2021-22555 allow privilege escalation?
The vulnerability exists in the Linux kernel's Netfilter x_tables component, which handles packet filtering rules. When processing compatibility structures for 32-bit applications on 64-bit kernels, a heap out-of-bounds write occurs that corrupts adjacent memory. An attacker can exploit this by creating crafted Netfilter rules through user namespaces, carefully manipulating the heap layout to overwrite kernel function pointers and gain root-level access.
Which Linux kernel versions are affected by CVE-2021-22555?
The vulnerability affects Linux kernels from version 2.6.19 up through version 5.12 (exclusive of patched releases). Specific fixed versions include 4.4.267, 4.9.267, 4.14.231, 4.19.188, 5.4.113, and 5.10.31 for their respective branches. Any distribution running a kernel in these ranges without backported patches is vulnerable.
Is CVE-2021-22555 being actively exploited?
Yes, CVE-2021-22555 has been confirmed as actively exploited and is listed in CISA's Known Exploited Vulnerabilities catalog. Multiple public exploits are available, including full privilege escalation proof-of-concept code. The EPSS score of 0.85239 (99.3rd percentile) confirms an extremely high probability of ongoing exploitation attempts.
Can I mitigate CVE-2021-22555 without updating the kernel?
As a temporary mitigation, you can disable unprivileged user namespaces by setting kernel.unprivileged_userns_clone=0 in your sysctl configuration. This prevents unprivileged users from creating the namespaces needed to trigger the vulnerability. However, this is only a temporary measure and a full kernel update remains the recommended remediation.
Need Help With Vulnerability Management?
Our security experts can help you prioritize and remediate vulnerabilities effectively.