CVE-2022-50310

7.8 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in the Linux kernel's IPv6 multicast routing subsystem. When network namespace initialization fails, the kernel attempts to access already-freed memory, potentially leading to kernel crashes or local privilege escalation. Systems running affected Linux kernel versions with IPv6 enabled are vulnerable.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated in CVE, but patches exist in stable branches. Likely affects versions before the fix commits.
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires IPv6 support and the ip6mr (IPv6 multicast routing) module. The vulnerability triggers during network namespace setup failures.

📦 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 →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash, or potential local privilege escalation allowing an attacker to gain root access.

🟠

Likely Case

Kernel crash or system instability when network namespace operations fail during setup.

🟢

If Mitigated

No impact if the vulnerable code path isn't triggered or if IPv6 is disabled.

🌐 Internet-Facing: LOW - This vulnerability requires local access to trigger.
🏢 Internal Only: MEDIUM - Local users or processes could potentially exploit this to crash systems or escalate privileges.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires local access and triggering specific error conditions during network namespace creation. The vulnerability is in error handling code paths.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patched in kernel commits 1ca695207ed2271ecbf8ee6c641970f621c157cc and 22a68c3b9362eaac7b035eba09e95e6b3f7a912c

Vendor Advisory: https://git.kernel.org/stable/c/1ca695207ed2271ecbf8ee6c641970f621c157cc

Restart Required: Yes

Instructions:

1. Update to a kernel version containing the fix commits. 2. Check with your Linux distribution for available security updates. 3. Reboot the system after kernel update.

🔧 Temporary Workarounds

Disable IPv6 multicast routing

linux

Prevent loading of the vulnerable ip6mr module

echo 'blacklist ip6mr' >> /etc/modprobe.d/blacklist.conf
rmmod ip6mr

Disable IPv6 entirely

linux

Completely disable IPv6 to avoid the vulnerable code path

echo 'net.ipv6.conf.all.disable_ipv6 = 1' >> /etc/sysctl.conf
sysctl -p

🧯 If You Can't Patch

  • Restrict local user access to prevent potential privilege escalation attempts
  • Monitor system logs for kernel panic or crash events related to network namespace operations

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if IPv6 multicast routing is enabled: 'uname -r' and 'lsmod | grep ip6mr'

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is patched: 'uname -r' should show version containing fix commits. Check with distribution security advisories.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • KASAN use-after-free reports in dmesg
  • Network namespace creation failures

Network Indicators:

  • Unusual network namespace creation attempts by local users

SIEM Query:

source="kernel" AND ("KASAN: use-after-free" OR "ip6mr_sk_done" OR "addrconf_init_net failed")

🔗 References

📤 Share & Export