# CVE-2025-38000: sch\_hfsc: Fix qlen accounting bug when using peek in hfsc\_enqueue()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 18, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-06-06T13:03:35.405Z
- **Modified:** 2026-10-15T22:18:23.970Z

## Who should check

- Anyone running Linux \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 1034e3310752e8675e313f7271b348914008719a; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< f9f593e34d2fb67644372c8f7b033bdc622ad228; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 89c301e929a0db14ebd94b4d97764ce1d6981653; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< f1dde3eb17dc1b8bd07aed00004b1e05fc87a3d4; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 93c276942e75de0e5bc91576300d292e968f5a02; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 49b21795b8e5654a7df3d910a12e1060da4c04cf; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 3f981138109f63232a5fb7165938d4c945cc1b9d
- Anyone running Linux 4.8

## 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.

## Affected and fixed versions

- Linux: \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 1034e3310752e8675e313f7271b348914008719a; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< f9f593e34d2fb67644372c8f7b033bdc622ad228; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 89c301e929a0db14ebd94b4d97764ce1d6981653; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< f1dde3eb17dc1b8bd07aed00004b1e05fc87a3d4; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 93c276942e75de0e5bc91576300d292e968f5a02; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 49b21795b8e5654a7df3d910a12e1060da4c04cf; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 3f981138109f63232a5fb7165938d4c945cc1b9d (cvelist)
- Linux: 4.8 (cvelist)

## Mitigation

- Upgrade Linux to 3f981138109f63232a5fb7165938d4c945cc1b9d or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-38000. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38000.md
Affected: Linux >= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, < 1034e3310752e8675e313f7271b348914008719a; >= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, < f9f593e34d2fb67644372c8f7b033bdc622ad228; >= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, < 89c301e929a0db14ebd94b4d97764ce1d6981653; >= 12d0ad3be9c3854e52ec74b…
Fixed in: Linux 1034e3310752e8675e313f7271b348914008719a, Linux 89c301e929a0db14ebd94b4d97764ce1d6981653, Linux 93c276942e75de0e5bc91576300d292e968f5a02, Linux 49b21795b8e5654a7df3d910a12e1060da4c04cf, Linux 3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335, Linux 3f981138109f63232a5fb7165938d4c945cc1b9d

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-38000 being exploited?

There is no confirmed exploitation: CVE-2025-38000 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-38000?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-38000?

Linux \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 1034e3310752e8675e313f7271b348914008719a; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< f9f593e34d2fb67644372c8f7b033bdc622ad228; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 89c301e929a0db14ebd94b4d97764ce1d6981653; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< f1dde3eb17dc1b8bd07aed00004b1e05fc87a3d4; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 93c276942e75de0e5bc91576300d292e968f5a02; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 49b21795b8e5654a7df3d910a12e1060da4c04cf; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335; \>= 12d0ad3be9c3854e52ec74bb83bb6f43612827c7, \< 3f981138109f63232a5fb7165938d4c945cc1b9d; Linux 4.8.

### Is there a fix for CVE-2025-38000?

Yes. Fixed in Linux 1034e3310752e8675e313f7271b348914008719a, Linux 89c301e929a0db14ebd94b4d97764ce1d6981653, Linux 93c276942e75de0e5bc91576300d292e968f5a02, Linux 49b21795b8e5654a7df3d910a12e1060da4c04cf, Linux 3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335, Linux 3f981138109f63232a5fb7165938d4c945cc1b9d. Upgrade Linux to 3f981138109f63232a5fb7165938d4c945cc1b9d or later.

### How do I check if I'm affected by CVE-2025-38000?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/1034e3310752e8675e313f7271b348914008719a>
- patch: <https://git.kernel.org/stable/c/f9f593e34d2fb67644372c8f7b033bdc622ad228>
- patch: <https://git.kernel.org/stable/c/89c301e929a0db14ebd94b4d97764ce1d6981653>
- patch: <https://git.kernel.org/stable/c/f1dde3eb17dc1b8bd07aed00004b1e05fc87a3d4>
- patch: <https://git.kernel.org/stable/c/93c276942e75de0e5bc91576300d292e968f5a02>
- patch: <https://git.kernel.org/stable/c/49b21795b8e5654a7df3d910a12e1060da4c04cf>
- patch: <https://git.kernel.org/stable/c/3f3a22eebbc32b4fa8ce9c1d5f9db214b45b9335>
- patch: <https://git.kernel.org/stable/c/3f981138109f63232a5fb7165938d4c945cc1b9d>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-38000>

HTML: <https://flawdb.com/CVE-2025-38000> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-38000>
