CVE-2024-50154
📋 TL;DR
A race condition in the Linux kernel's TCP/DCCP implementation can cause a use-after-free vulnerability when handling connection requests. This allows attackers to potentially execute arbitrary code or cause denial of service on affected systems. The vulnerability primarily affects Linux systems with specific configurations where BPF programs are attached to trace TCP retransmissions.
💻 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 →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
Remote code execution leading to full system compromise, kernel panic causing system crash, or data corruption.
Likely Case
Kernel crash leading to denial of service, system instability, or information disclosure through memory leaks.
If Mitigated
Minimal impact if BPF tracing is disabled or systems are not internet-facing with strict firewall rules.
🎯 Exploit Status
Exploitation requires precise timing conditions and specific BPF tracing configurations. The race window is small, making reliable exploitation challenging.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in kernel commits: 106e457953315e476b3642ef24be25ed862aaba3, 5071beb59ee416e8ab456ac8647a4dabcda823b1, 51e34db64f4e43c7b055ccf881b7f3e0c31bb26d, 8459d61fbf24967839a70235165673148c7c7f17, 997ae8da14f1639ce6fb66a063dab54031cd61b3
Vendor Advisory: https://git.kernel.org/stable/c/106e457953315e476b3642ef24be25ed862aaba3
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commits. 2. Check with your distribution vendor for specific patched kernel versions. 3. Reboot system after kernel update.
🔧 Temporary Workarounds
Disable BPF tracing on TCP retransmit
linuxRemove BPF programs attached to trace_tcp_retransmit_synack tracepoint to eliminate attack surface
# Check for attached BPF programs
bpftool prog list | grep -i tcp_retransmit
# Detach BPF programs if found
Restrict BPF program loading
linuxLimit BPF program loading to trusted users only
# Set kernel.unprivileged_bpf_disabled=1
sysctl -w kernel.unprivileged_bpf_disabled=1
# Add to /etc/sysctl.conf for persistence
🧯 If You Can't Patch
- Disable all BPF tracing and monitoring on TCP connections
- Implement strict network segmentation and firewall rules to limit TCP connection exposure
🔍 How to Verify
Check if Vulnerable:
Check kernel version and verify if BPF programs are attached to trace_tcp_retransmit_synack: bpftool prog list | grep -i tcp_retransmit
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version contains fix commits and no BPF programs are attached to vulnerable tracepoints
📡 Detection & Monitoring
Log Indicators:
- Kernel panic logs
- KFENCE use-after-free detection messages
- TCP retransmission anomalies
Network Indicators:
- Excessive SYN+ACK retransmissions
- Unusual TCP connection patterns
SIEM Query:
source="kernel" AND ("KFENCE" OR "use-after-free" OR "reqsk_timer_handler")
🔗 References
- https://git.kernel.org/stable/c/106e457953315e476b3642ef24be25ed862aaba3
- https://git.kernel.org/stable/c/5071beb59ee416e8ab456ac8647a4dabcda823b1
- https://git.kernel.org/stable/c/51e34db64f4e43c7b055ccf881b7f3e0c31bb26d
- https://git.kernel.org/stable/c/8459d61fbf24967839a70235165673148c7c7f17
- https://git.kernel.org/stable/c/997ae8da14f1639ce6fb66a063dab54031cd61b3
- https://git.kernel.org/stable/c/c964bf65f80a14288d767023a1b300b30f5b9cd0
- https://git.kernel.org/stable/c/e8c526f2bdf1845bedaf6a478816a3d06fa78b8f
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html
- https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html