Skip to main content

CVE-2024-56770: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-56770cvecve-2024-56770
Published: Wed Jan 08 2025 (01/08/2025, 16:36:59 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: net/sched: netem: account for backlog updates from child qdisc In general, 'qlen' of any classful qdisc should keep track of the number of packets that the qdisc itself and all of its children holds. In case of netem, 'qlen' only accounts for the packets in its internal tfifo. When netem is used with a child qdisc, the child qdisc can use 'qdisc_tree_reduce_backlog' to inform its parent, netem, about created or dropped SKBs. This function updates 'qlen' and the backlog statistics of netem, but netem does not account for changes made by a child qdisc. 'qlen' then indicates the wrong number of packets in the tfifo. If a child qdisc creates new SKBs during enqueue and informs its parent about this, netem's 'qlen' value is increased. When netem dequeues the newly created SKBs from the child, the 'qlen' in netem is not updated. If 'qlen' reaches the configured sch->limit, the enqueue function stops working, even though the tfifo is not full. Reproduce the bug: Ensure that the sender machine has GSO enabled. Configure netem as root qdisc and tbf as its child on the outgoing interface of the machine as follows: $ tc qdisc add dev <oif> root handle 1: netem delay 100ms limit 100 $ tc qdisc add dev <oif> parent 1:0 tbf rate 50Mbit burst 1542 latency 50ms Send bulk TCP traffic out via this interface, e.g., by running an iPerf3 client on the machine. Check the qdisc statistics: $ tc -s qdisc show dev <oif> Statistics after 10s of iPerf3 TCP test before the fix (note that netem's backlog > limit, netem stopped accepting packets): qdisc netem 1: root refcnt 2 limit 1000 delay 100ms Sent 2767766 bytes 1848 pkt (dropped 652, overlimits 0 requeues 0) backlog 4294528236b 1155p requeues 0 qdisc tbf 10: parent 1:1 rate 50Mbit burst 1537b lat 50ms Sent 2767766 bytes 1848 pkt (dropped 327, overlimits 7601 requeues 0) backlog 0b 0p requeues 0 Statistics after the fix: qdisc netem 1: root refcnt 2 limit 1000 delay 100ms Sent 37766372 bytes 24974 pkt (dropped 9, overlimits 0 requeues 0) backlog 0b 0p requeues 0 qdisc tbf 10: parent 1:1 rate 50Mbit burst 1537b lat 50ms Sent 37766372 bytes 24974 pkt (dropped 327, overlimits 96017 requeues 0) backlog 0b 0p requeues 0 tbf segments the GSO SKBs (tbf_segment) and updates the netem's 'qlen'. The interface fully stops transferring packets and "locks". In this case, the child qdisc and tfifo are empty, but 'qlen' indicates the tfifo is at its limit and no more packets are accepted. This patch adds a counter for the entries in the tfifo. Netem's 'qlen' is only decreased when a packet is returned by its dequeue function, and not during enqueuing into the child qdisc. External updates to 'qlen' are thus accounted for and only the behavior of the backlog statistics changes. As in other qdiscs, 'qlen' then keeps track of how many packets are held in netem and all of its children. As before, sch->limit remains as the maximum number of packets in the tfifo. The same applies to netem's backlog statistics.

AI-Powered Analysis

AILast updated: 06/28/2025, 07:56:05 UTC

Technical Analysis

CVE-2024-56770 is a vulnerability in the Linux kernel's network scheduling subsystem, specifically affecting the netem (network emulator) queuing discipline (qdisc). Netem is used to simulate network conditions such as delay, loss, and bandwidth constraints. The vulnerability arises from incorrect accounting of packet backlog ('qlen') when netem is used with a child qdisc, such as Token Bucket Filter (tbf). Normally, the 'qlen' value should reflect the total number of packets held by netem and all its child qdiscs. However, due to a logic flaw, netem only accounts for packets in its internal tfifo queue and does not properly update 'qlen' when packets are enqueued or dequeued by the child qdisc. This leads to a mismatch where 'qlen' can reach the configured limit even though the tfifo is not full, causing netem to stop accepting new packets and effectively locking the network interface. The issue manifests when Generic Segmentation Offload (GSO) is enabled and netem is configured as the root qdisc with tbf as its child. Bulk TCP traffic sent through this interface can cause netem to incorrectly report backlog, resulting in dropped packets and halted transmission. The patch corrects this by adding a counter for tfifo entries and ensuring 'qlen' is only decreased when packets are dequeued from netem, properly accounting for external updates from child qdiscs. This fix restores accurate backlog statistics and prevents interface lockups. No known exploits are reported in the wild, and the vulnerability requires specific network configurations and root privileges to trigger.

Potential Impact

For European organizations, this vulnerability could degrade network performance and availability on Linux-based systems that utilize netem with child qdiscs like tbf, especially in environments simulating network conditions for testing or traffic shaping. The interface lockup caused by incorrect backlog accounting can lead to packet drops and stalled network traffic, impacting critical services relying on stable network throughput. This may affect data centers, ISPs, telecom providers, and enterprises using Linux routers or firewalls with advanced traffic control. Although exploitation requires root access and specific qdisc configurations, the impact on confidentiality and integrity is minimal; the primary concern is availability degradation. In high-demand or latency-sensitive environments, such as financial services, telecommunications, or cloud providers in Europe, this could disrupt operations and service level agreements. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to accidental or malicious triggering of the issue during network traffic bursts.

Mitigation Recommendations

European organizations should apply the official Linux kernel patch that addresses this backlog accounting flaw as soon as it becomes available in their distribution's kernel updates. Until patched, administrators should avoid using netem with child qdiscs like tbf in production environments or disable GSO on interfaces where netem is configured to prevent triggering the bug. Monitoring qdisc statistics with 'tc -s qdisc show' can help detect abnormal backlog values or packet drops indicative of this issue. Network engineers should review traffic control configurations to minimize complex qdisc nesting that could expose this vulnerability. Additionally, implementing strict access controls to limit root-level modifications to network qdisc settings reduces the risk of accidental or intentional exploitation. Testing network emulation setups in isolated environments before deployment can help identify this problem early. Finally, organizations should maintain up-to-date kernel versions and subscribe to Linux security advisories to receive timely notifications and patches.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T11:26:39.763Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9822c4522896dcbde7ab

Added to database: 5/21/2025, 9:08:50 AM

Last enriched: 6/28/2025, 7:56:05 AM

Last updated: 7/28/2025, 4:18:32 PM

Views: 9

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats