Skip to main content
Mallory
HighCISA KEVExploited in the wildPublic exploit

Linux Kernel Netfilter Heap Out-of-Bounds Write Privilege Escalation

IdentifiersCVE-2021-22555CWE-787· Out-of-bounds Write

CVE-2021-22555 is a local Linux kernel vulnerability in the Netfilter subsystem, specifically in net/netfilter/x_tables.c, caused by a heap out-of-bounds write. The flaw affects Linux kernels since v2.6.19-rc1. Available context identifies the bug as a heap overflow / heap out-of-bounds write in Netfilter and notes that exploitation can corrupt heap memory; one cited case study states the vulnerable condition occurs when memset initializes memory with a size larger than the target object, resulting in zero bytes being written out of bounds. Successful exploitation can be used to corrupt adjacent kernel heap objects and obtain local privilege escalation.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

The primary impact is local privilege escalation to root through kernel heap memory corruption. The provided context also states that exploitation can cause denial of service due to heap corruption. Because the flaw is in kernel space, successful exploitation compromises the integrity of the operating system and can enable full system takeover by a local attacker.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce local attack surface by restricting untrusted local code execution and limiting access to user namespaces where feasible, as the provided context states exploitation is possible through user namespace. Harden systems by minimizing the ability of unprivileged users to create or access namespaces and by applying kernel hardening controls available in the environment. These are compensating controls only and do not remove the underlying kernel flaw.

Remediation

Patch, then assume compromise.

Apply vendor-supplied kernel updates that fix CVE-2021-22555. Because the vulnerability affects Linux kernels since v2.6.19-rc1 and impacts modern Linux distributions, remediation requires upgrading to a patched kernel package from the distribution or upstream vendor. Organizations should prioritize patching because the vulnerability is listed by CISA in the Known Exploited Vulnerabilities catalog and public exploits are available.
PUBLIC EXPLOITS

Exploits

4 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (2 hidden).

VALID 4 / 6 TOTALView more in app
CVE-2021-22555-PocMaturityPoCVerified exploit

Repository contains a single C exploit (exploit.c) plus a short README. The code is a local Linux kernel privilege-escalation exploit targeting CVE-2021-22555 (netfilter/iptables heap out-of-bounds write). It is tailored for specific kernel builds via compile-time constants (notably Ubuntu 5.8.0-48-generic; an alternate CentOS 5.4.89 profile is present but disabled). High-level exploit flow (as evidenced by constants, structures, and the visible tail of the code): - Uses SysV message queues (msg_msg/msg_msgseg) for heap shaping and to create controlled fake objects. - Uses AF_UNIX socket buffers (skbuff) spraying (NUM_SOCKETS/NUM_SKBUFFS) to place attacker-controlled data in kernel heap. - Uses many pipes (NUM_PIPEFDS) and targets pipe_buffer objects; it forges/overwrites pipe_buffer->ops to point to a fake pipe_buf_operations table. - The fake ops->release is set to a kernel gadget (per-kernel-version gadget addresses) to gain control flow, then a kernel ROP chain is built (build_krop()) to call prepare_kernel_cred(0) and commit_creds() (addresses hardcoded per kernel profile), resulting in root. - After gaining root, it verifies by opening /etc/shadow, then attempts container escape by calling setns() on /proc/1/ns/mnt, /proc/1/ns/pid, and /proc/1/ns/net, cleans up message queues/sockets, and finally execve()s /bin/bash -i. No C2 or remote network endpoints are used by the exploit itself; it is a purely local LPE with post-exploitation namespace switching. The only network-relevant observable is the README’s ISO download URL for setting up a test environment.

SpydomainDisclosed Feb 2, 2026clocal
CVE-2021-22555MaturityPoCVerified exploit

Repository contains a working local Linux kernel exploit for CVE-2021-22555 (netfilter/x_tables OOB write) adapted from Google security-research PoC. The main file (exploit.c) is a multi-stage LPE: (1) sets up a namespace sandbox, sockets, and SysV message queues; (2) triggers the x_tables OOB write and uses message-queue heap grooming to corrupt and locate a target message; (3) performs SMAP bypass and leaks kernel heap pointers; (4) bypasses KASLR by leaking a pipe_buffer/anon_pipe_buf_ops pointer and computes kernel base; (5) achieves kernel code execution by forging pipe_buffer ops and pivoting into a kernel ROP chain that calls prepare_kernel_cred/commit_creds to become root; then it attempts to escape a container by setns() into /proc/1 namespaces and finally spawns /bin/sh. Hardcoded gadget and symbol offsets (e.g., commit_creds, prepare_kernel_cred, anon_pipe_buf_ops, and multiple ROP gadgets) indicate it is tuned to a specific kernel build/config (example shown: Linux 5.11.14 with kaslr enabled). Supporting scripts: start.sh launches a QEMU VM with SMEP/SMAP enabled and KASLR ("kaslr" kernel arg) plus a GDB stub (-s). gdb_kernel.sh attaches GDB to localhost:1234 and sets breakpoints at key gadget addresses for debugging the exploit.

glutton-suDisclosed Feb 25, 2026cbashlocal (kernel) privilege escalation via netfilter/x_tables out-of-bounds write; heap spraying with SysV msg queues + sk_buffs + pipe_buffer to achieve kernel ROP, KASLR leak, SMAP bypass; optional container escape via setns
CVE-2021-22555-PipeVersionMaturityPoCVerified exploit

This repository contains a local privilege escalation exploit for CVE-2021-22555, targeting the Linux kernel (tested on versions 4.15 and 5.8). The exploit leverages a pipe-primitive technique to achieve kernel memory corruption, allowing it to overwrite the /usr/bin/mount binary with a SUID shell payload. The exploit is implemented in a single C file (exploit.c), which contains all the logic for namespace setup, memory spraying, exploitation, and payload delivery. The payload is an embedded ELF binary that, once written to /usr/bin/mount, can be executed to obtain a root shell. The README provides a brief overview and compilation instructions. The exploit requires local access to the target system and does not require KASLR, SMAP, SMEP, or KPTI bypasses due to the use of the pipe-primitive. No network endpoints are involved; the only fingerprintable endpoint is the file path /usr/bin/mount, which is overwritten during exploitation.

veritas501Disclosed Apr 5, 2022clocal
CVE-2021-22555-ExploitMaturityPoCVerified exploit

This repository contains a local privilege escalation exploit for CVE-2021-22555, a heap out-of-bounds write vulnerability in the Linux kernel's net/netfilter/x_tables.c. The exploit is implemented in C (cve_2021_22555.c) and is designed to be compiled and run on a vulnerable Linux system. The README provides compilation and usage instructions, as well as tested kernel versions (Ubuntu 5.8.0-48-generic and COS 5.4.89+). The exploit works by manipulating kernel memory via message queues, sockets, and pipe buffers to achieve arbitrary code execution in the kernel, bypassing SMAP and KASLR protections. Upon success, it checks for root privileges by accessing /etc/shadow, attempts to escape container namespaces by joining /proc/1/ns/*, and finally spawns a root shell (/bin/bash -i). The exploit is operational and provides a working local root shell on affected systems. No network endpoints are involved; all actions are performed locally on the target system.

xyjl-lyDisclosed Jul 16, 2021clocal
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Brocade Communications SystemsFabric Operating Systemoperating_system
LinuxLinux Kerneloperating_system
NetAppAff 500f Firmwareoperating_system
NetAppAff A250 Firmwareoperating_system
NetAppAff A400 Firmwareoperating_system
NetAppC250 Firmwareoperating_system
NetAppC400 Firmwareoperating_system
NetAppCloud Backupapplication
NetAppFas 8300 Firmwareoperating_system
NetAppFas 8700 Firmwareoperating_system
NetAppH300s Firmwareoperating_system
NetAppH410c Firmwareoperating_system
NetAppH410s Firmwareoperating_system
NetAppH500s Firmwareoperating_system
NetAppH610c Firmwareoperating_system
NetAppH610s Firmwareoperating_system
NetAppH615c Firmwareoperating_system
NetAppH700s Firmwareoperating_system
NetAppHci Management Nodeapplication
NetAppSolidfireapplication
NetAppSolidfire Baseboard Management Controllerapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence3

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity11

Community discussion across Reddit, Mastodon, and other social sources.