CVE DatabaseCVE-2021-22555
한국어 권고문 →
CVE-2021-225557.8/HIGHCISA KEVCWE-787CWE-787

Linux Kernel Netfilter x_tables Heap Out-of-Bounds Write Local Privilege Escalation (CVE-2021-22555) Analysis and Mitigation Guide

⚡ Jump to Patch
Affected Vendors
linux
Affected Components
linux_kernel
Published Date
2021-07-07
CVSS v3.1
7.8
HIGH
EPSS (30d)
78.7%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Linux Kernel versions since v2.6.19-rc1 that lack the official security patch, particularly environments with user namespaces enabled

Impact

A local attacker can trigger heap memory corruption to escalate privileges to root or cause a system-wide Denial of Service (DoS)

Mitigation

Upgrade the Linux kernel to the latest stable release, or apply temporary workarounds to restrict unprivileged user namespace creation

Affected Products & Version Scope

Linux Kernel v2.6.19-rc1 up to patched versions (affecting major distributions including Ubuntu, Debian, and RHEL)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Update your Linux kernel to the latest patched version using the system package manager and reboot the host.

bash
# For Ubuntu / Debian-based systems
sudo apt-get update && sudo apt-get install --only-upgrade -y linux-image-generic
sudo reboot

# For RHEL / CentOS / Rocky Linux-based systems
sudo yum update -y kernel
sudo reboot

2. Temporary Workaround & Hardening Configuration

If immediate patching and rebooting are not feasible, disable unprivileged user namespaces to break the exploitation chain.

bash
# Temporarily disable unprivileged user namespace cloning
sudo sysctl -w kernel.unprivileged_userns_clone=0

# Persist the configuration across reboots
echo 'kernel.unprivileged_userns_clone=0' | sudo tee -a /etc/sysctl.d/99-disable-userns.conf
sudo sysctl --system

3. Log Audit & IoC Verification Commands

Verify the current running kernel version and inspect system logs for potential exploitation attempts or related kernel panics.

bash
# Check the active kernel version
uname -r

# Search system logs for Netfilter anomalies or general protection faults
sudo dmesg | grep -Ei 'x_tables|netfilter|general protection fault|unable to handle kernel'
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
Due to active exploitation (CISA KEV), immediately apply the kernel security updates or disable unprivileged user namespaces.

Block Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot

Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.

100% MITRE ATT&CK Detection · 1-Click Rollback

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2021-22555) is a heap out-of-bounds write (CWE-787) discovered in the Netfilter subsystem (net/netfilter/x_tables.c) of the Linux kernel. The root cause lies in the 32-bit compatibility layer (compat) which handles structure conversion for 64-bit kernels. Due to an offset calculation error during the alignment of padding bytes, the kernel incorrectly calculates the required buffer size, leading to a write of zero (null) bytes beyond the allocated heap buffer boundary.

2. Exploitation Mechanics & Attack Scenario

An attacker with low-privilege access leverages the CLONE_NEWUSER flag to instantiate a new user namespace, granting them temporary CAP_NET_ADMIN privileges within that namespace. This allows the attacker to interact with Netfilter socket APIs via setsockopt. By sending a crafted IPT_SO_SET_REPLACE or IP6T_SO_SET_REPLACE request, the attacker triggers the compat_do_replace function. The subsequent out-of-bounds write corrupts adjacent kernel heap structures, allowing the attacker to hijack control flow and execute arbitrary code with kernel-level privileges.

3. Infrastructure & Business Impact

As a vulnerability listed in the CISA KEV catalog, this flaw has been actively exploited in the wild. In containerized environments (e.g., Docker, Kubernetes), this vulnerability poses a severe threat as it enables container escape, allowing an attacker inside a non-privileged container to compromise the underlying host operating system. This presents a critical risk to multi-tenant cloud infrastructures and enterprise server environments.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2021-22555)

FAQ

Q1. How critical is CVE-2021-22555 and is it actively exploited in the wild?

CVE-2021-22555 is rated CVSS 7.8 (HIGH) with a 30-day EPSS exploitation probability of 78.7%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2021-22555?

Primary impacted vendors include linux across linux_kernel. Scope summary: Linux Kernel v2.6.19-rc1 up to patched versions (affecting major distributions including Ubuntu, Debian, and RHEL)

Q3. What temporary mitigations or workarounds exist for CVE-2021-22555 before patching?

[Mitigation] Upgrade the Linux kernel to the latest stable release, or apply temporary workarounds to restrict unprivileged user namespace creation Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2021-22555

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (linux)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2021-22555 Linux Kernel Netfilter x_tables Heap Out-of-Bounds Write Local Privilege Escalation (CVE-2021-22555) Analysis and Mitigation Guide (CVSS 7.8) - Patch & Workaround | CVE Pulse