net/sched: sch_hfsc: Don't make class passive twice
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 51eb3b65544c9efd6a1026889ee5fb5aa62da3bb · < 66dbb13eeb2fc339f8f548a9076be4c1a94857b0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/sched: sch_hfsc: Don't make class passive twice
update_vf() is called from two places for the same class during a single dequeue when the class's child qdisc (e.g. codel/fq_codel) drops its last packets while dequeuing:
1. The child calls qdisc_tree_reduce_backlog(), which, now that the child is empty, invokes hfsc_qlen_notify() -> update_vf(cl, 0, 0) and turns the class passive (cl_nactive is decremented up the hierarchy).
2. hfsc_dequeue() then calls update_vf(cl, qdisc_pkt_len(skb), cur_time) to charge the dequeued bytes.
On the second call the class is already passive, but its child qdisc is still empty, so update_vf() arms go_passive again:
if (cl->qdisc->q.qlen == 0 && cl->cl_flags & HFSC_FSC) go_passive = 1;
The leaf is then skipped by the cl_nactive == 0 check inside the loop, which does not clear go_passive, so the stale go_passive propagates to the parent and decrements its cl_nactive a second time. A parent that still has other active children is driven to cl_nactive == 0 and removed from the vttree, even though those siblings are still backlogged. They are never dequeued again and the qdisc stalls.
From the CVE record · Linux
The Linux kernel HFSC scheduler can mark a parent class passive twice when a child queue drops its last packets during dequeue. This can leave other backlogged child classes unable to dequeue and stall the queue; the input does not establish an attacker path, authentication requirement, or user-interaction requirement.
Operators running the Linux kernel with the HFSC scheduler should check their installations; affected versions are not specified.