CVE-2022-50213

7.8 HIGH

📋 TL;DR

A use-after-free vulnerability in the Linux kernel's netfilter nf_tables subsystem allows local attackers to potentially escalate privileges or crash the system. The vulnerability occurs when removing tables while sets from different tables are referenced by ID, leading to memory corruption. This affects all Linux systems using nf_tables with the vulnerable kernel versions.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions from introduction of nf_tables SET_ID feature up to fixes in stable releases
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires nf_tables to be enabled and in use. Most modern Linux distributions have nf_tables enabled by default as it replaces iptables.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation to root, kernel panic causing system crash, or arbitrary code execution in kernel context.

🟠

Likely Case

Local privilege escalation allowing attackers to gain root access on vulnerable systems.

🟢

If Mitigated

Limited to denial of service if exploit fails or system has additional security controls like SELinux/AppArmor.

🌐 Internet-Facing: LOW - Requires local access to exploit, not remotely exploitable.
🏢 Internal Only: HIGH - Local attackers or compromised user accounts can exploit this for privilege escalation.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploit requires local access and knowledge of nf_tables internals. Multiple proof-of-concepts exist in security research circles.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel versions with commits referenced in CVE

Vendor Advisory: https://git.kernel.org/stable/c/470ee20e069a6d05ae549f7d0ef2bdbcee6a81b2

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution. 2. For RHEL/CentOS: yum update kernel. 3. For Ubuntu/Debian: apt update && apt upgrade linux-image. 4. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable nf_tables

linux

Disable the vulnerable nf_tables subsystem if not required

modprobe -r nf_tables
echo 'blacklist nf_tables' >> /etc/modprobe.d/blacklist.conf

Use iptables-legacy

linux

Switch to iptables-legacy instead of nftables

update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

🧯 If You Can't Patch

  • Restrict local user access through strict access controls and privilege separation
  • Implement kernel hardening features like SELinux/AppArmor to limit impact

🔍 How to Verify

Check if Vulnerable:

Check kernel version: uname -r and compare with affected versions from distribution advisories

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version after update: uname -r and ensure it matches patched version from vendor

📡 Detection & Monitoring

Log Indicators:

  • Kernel oops messages in /var/log/kern.log or dmesg
  • System crashes or unexpected reboots
  • Privilege escalation attempts in audit logs

Network Indicators:

  • Unusual nf_tables rule modifications by non-root users

SIEM Query:

source="kernel" AND ("nf_tables" OR "use-after-free" OR "general protection fault")

🔗 References

📤 Share & Export