CVE-2024-50257

7.8 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in the Linux kernel's netfilter subsystem, specifically in the ip6table_nat module. It allows local attackers to potentially crash the kernel or execute arbitrary code by triggering concurrent module unloading and getsockopt operations. Systems running affected Linux kernel versions with IPv6 and netfilter enabled are vulnerable.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific versions between 6.12.0-rc4 and patched versions; check upstream commits for exact range.
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires IPv6 support and netfilter/ip6table_nat module loaded. Many distributions enable these by default.

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

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

Kernel panic leading to denial of service, or potential privilege escalation to kernel-level code execution.

🟠

Likely Case

Kernel crash causing system instability or denial of service.

🟢

If Mitigated

Limited impact if proper kernel hardening and module loading restrictions are in place.

🌐 Internet-Facing: LOW - Requires local access to exploit.
🏢 Internal Only: MEDIUM - Local attackers on multi-user systems could exploit this vulnerability.

🎯 Exploit Status

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

Exploitation requires local access and precise timing to trigger the race condition between module unload and getsockopt operations.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patched in kernel commits: 6a1f088f9807f5166f58902d26246d0b88da03a8, ba22ea01348384df19cc1fabc7964be6e7189749, bab3bb35c03b263c486833d50d50c081d9e9832b, cb7c388b5967946f097afdb759b7c860305f2d96, f48d258f0ac540f00fa617dac496c4c18b5dc2fa

Vendor Advisory: https://git.kernel.org/stable/c/6a1f088f9807f5166f58902d26246d0b88da03a8

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.

🔧 Temporary Workarounds

Disable ip6table_nat module

linux

Prevent loading of vulnerable module if not required.

echo 'install ip6table_nat /bin/false' >> /etc/modprobe.d/disable-ip6table_nat.conf
rmmod ip6table_nat

Restrict module loading

linux

Prevent unauthorized module loading/unloading.

echo 'kernel.modules_disabled=1' >> /etc/sysctl.conf
sysctl -p

🧯 If You Can't Patch

  • Implement strict access controls to prevent local users from loading/unloading kernel modules.
  • Monitor system logs for module unloading activities and kernel warnings.

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if ip6table_nat module is loaded: 'lsmod | grep ip6table_nat' and 'uname -r'.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is updated to patched version and module is not loaded or updated.

📡 Detection & Monitoring

Log Indicators:

  • Kernel warnings about module_put UAF in dmesg
  • System logs showing ip6table_nat module unloading

Network Indicators:

  • Unusual getsockopt calls from local processes

SIEM Query:

source="kernel" AND "module_put" AND "UAF" OR "ip6table_nat"

🔗 References

📤 Share & Export