Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-26739 Overview
CVE-2024-26739 is a use-after-free vulnerability in the Linux kernel's traffic control subsystem, specifically in the net/sched: act_mirred action. The flaw occurs when the mirred action redirects a socket buffer (skb) through tcf_mirred_forward(). After the forward call, the skb is no longer owned by the caller, but the code could still override the return value to TC_ACT_SHOT, instructing the core to drop a buffer that was already handed off. This leads to a use-after-free condition on the skb structure [CWE-416]. The vulnerability affects multiple Linux kernel branches and Debian Linux 11.
Critical Impact
Local attackers with the ability to configure traffic control actions can trigger memory corruption in kernel space, potentially leading to privilege escalation or denial of service.
Affected Products
- Linux Kernel (multiple stable branches prior to the fix, including 6.8-rc1 through 6.8-rc4)
- Debian Linux 11
- Downstream distributions shipping affected kernel versions
Discovery Timeline
- 2024-04-03 - CVE-2024-26739 published to NVD
- 2025-05 - Debian LTS security advisory published
- 2025-10 - Debian LTS follow-up advisory published
- 2026-08-04 - Last updated in NVD database
Technical Details for CVE-2024-26739
Vulnerability Analysis
The vulnerability resides in the act_mirred traffic control action, which implements packet mirroring and redirection for Linux Quality of Service (QoS) and Traffic Control (TC) subsystems. When a packet is redirected, act_mirred invokes tcf_mirred_forward() to pass the skb to the destination. After this call succeeds, ownership of the skb transfers away from the mirred action.
The defective logic unconditionally overrode the return code to TC_ACT_SHOT under certain conditions, even after tcf_mirred_forward() had already consumed the buffer. The kernel's TC core then attempted to drop an skb that no longer belonged to it, resulting in a use-after-free on freed sk_buff memory.
Root Cause
The root cause is incorrect ordering between buffer ownership transfer and return-value handling in the mirred action. The retval override logic executed in both the success and error paths, violating the lifetime contract of skb structures after tcf_mirred_forward() returns. The upstream fix moves the TC_ACT_SHOT assignment into the error path only, where the skb remains owned by the caller and must be dropped.
Attack Vector
Exploitation requires local access with the CAP_NET_ADMIN capability within a network namespace. On systems where unprivileged user namespaces are enabled, standard users can obtain this capability inside a user namespace and configure TC rules using act_mirred. An attacker crafts specific TC filter and action chains that cause the vulnerable code path to execute, racing packet forwarding against the retval override. Successful exploitation of the resulting use-after-free can corrupt kernel memory structures and lead to privilege escalation or kernel panic.
See the upstream fix in Kernel Commit e873e8f7 and backports in Kernel Commit 0117fe0a, Kernel Commit 166c2c8a, and Kernel Commit 9d3ef89b for the authoritative technical details.
Detection Methods for CVE-2024-26739
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing act_mirred, tcf_mirred_forward, or sk_buff in dmesg and /var/log/kern.log.
- KASAN (Kernel Address Sanitizer) use-after-free reports pointing at net/sched/act_mirred.c on instrumented kernels.
- Unprivileged processes creating user namespaces and loading TC filters with tc qdisc or tc filter commands referencing mirred.
Detection Strategies
- Audit kernel versions across the fleet and flag hosts running kernels without the backported fixes referenced in the vendor advisories.
- Monitor auditd for netlink configuration changes targeting the traffic control subsystem from non-administrative users.
- Review eBPF or audit telemetry for processes invoking unshare(CLONE_NEWUSER | CLONE_NEWNET) followed by TC action creation.
Monitoring Recommendations
- Collect kernel ring buffer logs centrally and alert on crash signatures that reference net/sched modules.
- Track syscalls clone, unshare, and setns combined with subsequent sendmsg to AF_NETLINK sockets for anomaly baselining.
- Enforce EDR behavioral rules to flag unprivileged users granting themselves CAP_NET_ADMIN through user namespaces.
How to Mitigate CVE-2024-26739
Immediate Actions Required
- Apply the latest stable kernel updates from your distribution vendor that include the upstream fix commits.
- On Debian 11, install the kernel package versions referenced in the Debian LTS Announcement May 2025 and Debian LTS Announcement October 2025.
- Reboot systems after kernel updates to activate the patched image.
Patch Information
The upstream Linux kernel fix moves the TC_ACT_SHOT retval override into the error path so it is applied only when the skb has not been handed off to tcf_mirred_forward(). Patched kernels are available through the stable tree commits f4e294bb, 28cdbbd3, e873e8f7, 9d3ef89b, 166c2c8a, and 0117fe0a, as well as through Debian LTS updates.
Workarounds
- Disable unprivileged user namespaces by setting kernel.unprivileged_userns_clone=0 on systems that do not require them, reducing the local attack surface.
- Restrict CAP_NET_ADMIN using seccomp or Linux Security Modules such as AppArmor and SELinux for container workloads.
- Remove or unload the act_mirred kernel module on hosts that do not use mirred traffic control actions.
# Configuration example
# Disable unprivileged user namespaces (requires reboot or sysctl reload)
echo 'kernel.unprivileged_userns_clone=0' | sudo tee /etc/sysctl.d/99-disable-userns.conf
sudo sysctl --system
# Verify current running kernel version against patched versions
uname -r
# On Debian, upgrade to the patched kernel package
sudo apt-get update && sudo apt-get install --only-upgrade linux-image-$(uname -r | sed 's/.*-//')
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

