CVE-2025-38000

sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()

State
Published
Severity
7.8 High
Published
Jun 6, 2025
Updated
Oct 15, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 to before 1034e3310752e8675e313f7271b348914008719aAffected
  • 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 to before f9f593e34d2fb67644372c8f7b033bdc622ad228Affected
  • 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 to before 89c301e929a0db14ebd94b4d97764ce1d6981653Affected
  • 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 to before f1dde3eb17dc1b8bd07aed00004b1e05fc87a3d4Affected
  • 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 to before 93c276942e75de0e5bc91576300d292e968f5a02Affected
  • 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 to before 49b21795b8e5654a7df3d910a12e1060da4c04cfAffected
  • 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 to before 3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335Affected
  • 12d0ad3be9c3854e52ec74bb83bb6f43612827c7 to before 3f981138109f63232a5fb7165938d4c945cc1b9dAffected
LinuxLinux
  • 4.8Affected
  • before 4.8Not affected
  • 5.4.294 through 5.4.*Not affected
  • 5.10.238 through 5.10.*Not affected
  • 5.15.185 through 5.15.*Not affected
  • 6.1.141 through 6.1.*Not affected
  • 6.6.93 through 6.6.*Not affected
  • 6.12.31 through 6.12.*Not affected
  • 6.14.9 through 6.14.*Not affected
  • 6.15 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.