sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.4.294, 5.10.238, 5.15.185, 6.1.141, 6.6.93, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue() When enqueuing the first packet to an HFSC class, hfsc_enqueue() calls the child qdisc's peek() operation before incrementing sch->q.qlen and sch->qstats.backlog. If the child qdisc uses qdisc_peek_dequeued(), this may trigger an immediate dequeue and potential packet drop. In such cases, qdisc_tree_reduce_backlog() is called, but the HFSC qdisc's qlen and backlog have not yet been updated, leading to inconsistent queue accounting. This can leave an empty HFSC class in the active list, causing further consequences like use-after-free. This patch fixes the bug by moving the increment of sch->q.qlen and sch->qstats.backlog before the call to the child qdisc's peek() operation. This ensures that queue length and backlog are always accurate when packet drops or dequeues are triggered during the peek.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 · fixed in 1034e3310752e8675e313f7271b348914008719a; From 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 · fixed in f9f593e34d2fb67644372c8f7b033bdc622ad228; From 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 · fixed in 89c301e929a0db14ebd94b4d97764ce1d6981653; From 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 · fixed in f1dde3eb17dc1b8bd07aed00004b1e05fc87a3d4; From 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 · fixed in 93c276942e75de0e5bc91576300d292e968f5a02; From 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 · fixed in 49b21795b8e5654a7df3d910a12e1060da4c04cf; From 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 · fixed in 3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335; From 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 · fixed in 3f981138109f63232a5fb7165938d4c945cc1b9d
- Linux Linux
4.8
- KernelLinux
From 4.8.0 · fixed in 5.4.294; From 5.5.0 · fixed in 5.10.238; From 5.11.0 · fixed in 5.15.185; From 5.16.0 · fixed in 6.1.141; From 6.2.0 · fixed in 6.6.93; From 6.7.0 · fixed in 6.12.31; From 6.13.0 · fixed in 6.14.9
References 8
git.kernel.org
- stable/c/1034e3310752e8675e313f7271b348914008719a
- stable/c/f9f593e34d2fb67644372c8f7b033bdc622ad228
- stable/c/89c301e929a0db14ebd94b4d97764ce1d6981653
- stable/c/f1dde3eb17dc1b8bd07aed00004b1e05fc87a3d4
- stable/c/93c276942e75de0e5bc91576300d292e968f5a02
- stable/c/49b21795b8e5654a7df3d910a12e1060da4c04cf
- stable/c/3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335
- stable/c/3f981138109f63232a5fb7165938d4c945cc1b9d