CVE-2024-56770
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
08/01/2025
Last modified:
10/01/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net/sched: netem: account for backlog updates from child qdisc<br />
<br />
In general, &#39;qlen&#39; of any classful qdisc should keep track of the<br />
number of packets that the qdisc itself and all of its children holds.<br />
In case of netem, &#39;qlen&#39; only accounts for the packets in its internal<br />
tfifo. When netem is used with a child qdisc, the child qdisc can use<br />
&#39;qdisc_tree_reduce_backlog&#39; to inform its parent, netem, about created<br />
or dropped SKBs. This function updates &#39;qlen&#39; and the backlog statistics<br />
of netem, but netem does not account for changes made by a child qdisc.<br />
&#39;qlen&#39; then indicates the wrong number of packets in the tfifo.<br />
If a child qdisc creates new SKBs during enqueue and informs its parent<br />
about this, netem&#39;s &#39;qlen&#39; value is increased. When netem dequeues the<br />
newly created SKBs from the child, the &#39;qlen&#39; in netem is not updated.<br />
If &#39;qlen&#39; reaches the configured sch->limit, the enqueue function stops<br />
working, even though the tfifo is not full.<br />
<br />
Reproduce the bug:<br />
Ensure that the sender machine has GSO enabled. Configure netem as root<br />
qdisc and tbf as its child on the outgoing interface of the machine<br />
as follows:<br />
$ tc qdisc add dev root handle 1: netem delay 100ms limit 100<br />
$ tc qdisc add dev parent 1:0 tbf rate 50Mbit burst 1542 latency 50ms<br />
<br />
Send bulk TCP traffic out via this interface, e.g., by running an iPerf3<br />
client on the machine. Check the qdisc statistics:<br />
$ tc -s qdisc show dev <br />
<br />
Statistics after 10s of iPerf3 TCP test before the fix (note that<br />
netem&#39;s backlog > limit, netem stopped accepting packets):<br />
qdisc netem 1: root refcnt 2 limit 1000 delay 100ms<br />
Sent 2767766 bytes 1848 pkt (dropped 652, overlimits 0 requeues 0)<br />
backlog 4294528236b 1155p requeues 0<br />
qdisc tbf 10: parent 1:1 rate 50Mbit burst 1537b lat 50ms<br />
Sent 2767766 bytes 1848 pkt (dropped 327, overlimits 7601 requeues 0)<br />
backlog 0b 0p requeues 0<br />
<br />
Statistics after the fix:<br />
qdisc netem 1: root refcnt 2 limit 1000 delay 100ms<br />
Sent 37766372 bytes 24974 pkt (dropped 9, overlimits 0 requeues 0)<br />
backlog 0b 0p requeues 0<br />
qdisc tbf 10: parent 1:1 rate 50Mbit burst 1537b lat 50ms<br />
Sent 37766372 bytes 24974 pkt (dropped 327, overlimits 96017 requeues 0)<br />
backlog 0b 0p requeues 0<br />
<br />
tbf segments the GSO SKBs (tbf_segment) and updates the netem&#39;s &#39;qlen&#39;.<br />
The interface fully stops transferring packets and "locks". In this case,<br />
the child qdisc and tfifo are empty, but &#39;qlen&#39; indicates the tfifo is at<br />
its limit and no more packets are accepted.<br />
<br />
This patch adds a counter for the entries in the tfifo. Netem&#39;s &#39;qlen&#39; is<br />
only decreased when a packet is returned by its dequeue function, and not<br />
during enqueuing into the child qdisc. External updates to &#39;qlen&#39; are thus<br />
accounted for and only the behavior of the backlog statistics changes. As<br />
in other qdiscs, &#39;qlen&#39; then keeps track of how many packets are held in<br />
netem and all of its children. As before, sch->limit remains as the<br />
maximum number of packets in the tfifo. The same applies to netem&#39;s<br />
backlog statistics.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
CPE | From | Up to |
---|---|---|
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 3.3 (including) | 5.4.288 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.232 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.175 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.121 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.67 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.6 (excluding) |
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/10df49cfca73dfbbdb6c4150d859f7e8926ae427
- https://git.kernel.org/stable/c/216509dda290f6db92c816dd54b83c1df9da9e76
- https://git.kernel.org/stable/c/356078a5c55ec8d2061fcc009fb8599f5b0527f9
- https://git.kernel.org/stable/c/3824c5fad18eeb7abe0c4fc966f29959552dca3e
- https://git.kernel.org/stable/c/83c6ab12f08dcc09d4c5ac86fdb89736b28f1d31
- https://git.kernel.org/stable/c/c2047b0e216c8edce227d7c42f99ac2877dad0e4
- https://git.kernel.org/stable/c/f8d4bc455047cf3903cd6f85f49978987dbb3027