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-41040 Overview
CVE-2024-41040 is a use-after-free vulnerability [CWE-416] in the Linux kernel's net/sched subsystem, specifically within the connection tracking action module (act_ct). The flaw occurs in tcf_ct_flow_table_process_conn when resolving a conntrack clash. The connection tracking entry (ct) may be freed during clash resolution but is still referenced for further processing, leading to a slab-use-after-free detected by KASAN. Successful exploitation can cause kernel memory corruption, denial of service, or potential local privilege escalation on systems using traffic control (tc) with connection tracking actions.
Critical Impact
A local attacker with low privileges on a system using act_ct traffic control actions can trigger kernel memory corruption, causing denial of service or potential privilege escalation.
Affected Products
- Linux Kernel (multiple stable branches prior to the fix commits)
- Debian LTS distributions shipping affected kernel versions
- Any Linux distribution using act_ct with cls_flower for traffic classification
Discovery Timeline
- 2024-07-29 - CVE-2024-41040 published to NVD
- 2026-08-04 - Last updated in NVD database
Technical Details for CVE-2024-41040
Vulnerability Analysis
The vulnerability resides in the Linux kernel traffic control connection tracking action (act_ct). KASAN reports a slab-use-after-free in tcf_ct_flow_table_process_conn+0x12b/0x380 triggered during packet ingress processing via sch_handle_ingress and fl_classify.
The allocation path originates in nf_ct_ext_add via tcf_ct_act, which extends the conntrack entry. The free path occurs in nf_conntrack_free through __nf_ct_resolve_clash when __nf_conntrack_confirm resolves a conntrack clash. After the clash resolution destroys the conflicting ct, the stale pointer is still passed to tcf_ct_flow_table_process_conn, resulting in a read of freed slab memory.
Root Cause
The root cause is improper lifetime management of the ct pointer across the __nf_conntrack_confirm call. When clash resolution runs inside nf_ct_resolve_clash, it may free the original ct entry and substitute another. The caller in tcf_ct_act continued using the stale local pointer rather than re-fetching the current conntrack from the socket buffer (skb), violating the ownership contract established by conntrack confirmation.
Attack Vector
Exploitation requires local access with the ability to send network traffic that traverses a tc qdisc configured with act_ct and cls_flower. An attacker triggers concurrent conntrack entries that race to confirmation, forcing clash resolution. The resulting use-after-free can be shaped into a kernel information leak, denial of service through kernel panic, or potential privilege escalation depending on slab reuse patterns. The attack complexity is elevated because it requires inducing a conntrack clash under live traffic classification.
No public proof-of-concept exploit is available, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. See the upstream patch commits for technical details of the fix.
Detection Methods for CVE-2024-41040
Indicators of Compromise
- Kernel panic or oops messages referencing tcf_ct_flow_table_process_conn or tcf_ct_act in /var/log/kern.log or dmesg.
- KASAN reports showing slab-use-after-free in act_ct module when KASAN-enabled kernels are deployed.
- Unexpected network interface resets or softirq crashes correlated with heavy connection tracking load.
Detection Strategies
- Audit running kernel versions across the fleet and compare against the fixed stable branch commits (26488172b029, 2b4d68df3f57, 4e71b10a1008, 799a34901b63, b81a523d54ea, ef472cc6693b).
- Monitor host telemetry for kernel crash signatures involving nf_conntrack and act_ct call stacks.
- Enumerate hosts with tc qdiscs that reference action ct using configuration inventory tooling.
Monitoring Recommendations
- Collect and centralize kernel ring buffer logs to detect oops traces and softirq failures tied to net/sched.
- Alert on unexpected reboots on Linux hosts running container networking stacks (Kubernetes, OpenShift) that commonly rely on act_ct.
- Track conntrack table pressure and clash counters exposed via /proc/net/stat/nf_conntrack for anomalous spikes.
How to Mitigate CVE-2024-41040
Immediate Actions Required
- Apply the stable kernel update from your Linux distribution vendor that incorporates the upstream fix commits.
- Prioritize patching hosts running container runtimes, service meshes, or OVS-based networking that use act_ct with cls_flower.
- Reboot after updating the kernel package to ensure the patched image is loaded.
Patch Information
The fix retrieves ct from the skb again after confirming conntrack, ensuring the pointer reflects the surviving entry after clash resolution. Fixed stable kernel commits are published at kernel.org commit 26488172b029, commit 2b4d68df3f57, commit 4e71b10a1008, commit 799a34901b63, commit b81a523d54ea, and commit ef472cc6693b. Debian users should review the Debian LTS Announcement.
Workarounds
- If patching cannot be performed immediately, remove or avoid tc filter configurations that use action ct with cls_flower on exposed interfaces.
- Restrict local user access on affected hosts and limit untrusted workload execution until the kernel is updated.
- Enforce standard least-privilege controls and monitor kernel logs continuously until remediation is complete.
# Verify kernel version and check for act_ct usage
uname -r
tc filter show dev eth0 ingress | grep -i "action ct"
# After patching, confirm the running kernel matches the fixed version
dmesg | grep -i "kasan\|act_ct"
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

