CVE-2024-50186
📋 TL;DR
This CVE-2024-50186 is a use-after-free vulnerability in the Linux kernel's network subsystem where socket creation failures can leave dangling sk pointers. When exploited, this allows attackers to potentially execute arbitrary code or cause denial of service. All Linux systems running affected kernel versions are vulnerable.
💻 Affected Systems
- Linux kernel
📦 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 →⚠️ Risk & Real-World Impact
Worst Case
Kernel memory corruption leading to arbitrary code execution with kernel privileges, potentially resulting in full system compromise.
Likely Case
Kernel panic or system crash causing denial of service, with potential for limited information disclosure.
If Mitigated
System remains stable with no impact if patched or if exploit attempts are blocked by security controls.
🎯 Exploit Status
Exploitation requires triggering specific socket creation failure conditions. The vulnerability is in kernel error handling code, making reliable exploitation non-trivial.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Multiple stable kernel versions with fixes referenced in CVE links
Vendor Advisory: https://git.kernel.org/stable/c/563e6892e21d6ecabdf62103fc4e7b326d212334
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from your distribution's repositories. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.
🔧 Temporary Workarounds
Restrict AF_PACKET socket creation
linuxLimit ability to create raw sockets that could trigger the vulnerability
sysctl -w net.core.bpf_jit_enable=0
echo 1 > /proc/sys/net/core/bpf_jit_enable
🧯 If You Can't Patch
- Implement strict network segmentation to limit attack surface
- Use security modules like SELinux or AppArmor to restrict socket operations
🔍 How to Verify
Check if Vulnerable:
Check kernel version against distribution security advisories. Run: uname -r and compare with patched versions.
Check Version:
uname -r
Verify Fix Applied:
After patching and reboot, verify kernel version matches patched release. Check system logs for any kernel-related errors.
📡 Detection & Monitoring
Log Indicators:
- Kernel panic messages
- KASAN error reports in dmesg
- System crash/reboot logs
Network Indicators:
- Unusual AF_PACKET socket creation attempts
- Multiple failed socket creation requests
SIEM Query:
source="kernel" AND ("KASAN" OR "use-after-free" OR "sk pointer")
🔗 References
- https://git.kernel.org/stable/c/563e6892e21d6ecabdf62103fc4e7b326d212334
- https://git.kernel.org/stable/c/631083143315d1b192bd7d915b967b37819e88ea
- https://git.kernel.org/stable/c/8e1b72fd74bf9da3b099d09857f4e7f114f38e12
- https://git.kernel.org/stable/c/b7d22a79ff4e962b8af5ffe623abd1d6c179eb9f
- https://git.kernel.org/stable/c/daf462ff3cde6ecf22b98d9ae770232c10d28de2
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html