# CVE-2025-39677: net/sched: Fix backlog accounting in qdisc\_dequeue\_internal

> 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.26% (percentile 11, 2026-11-26)
- **Published:** 2025-09-05T17:20:43.145Z
- **Modified:** 2026-10-30T13:18:08.420Z

## Who should check

- Anyone running Linux \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< 65d1b5d84a0d697e9cfcdd0e07aad1bf1cb96295; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< dcfed7251e23cd71d32c4ecc444ff97992087e46; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< 38cdf8d1f5f3ee133f6e48dd422df4057fa9bfcb; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< a225f44d84b8900d679c5f5a9ea46fe9c0cc7802; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< 52bf272636bda69587952b35ae97690b8dc89941
- Anyone running Linux 3.5

## Description

In the Linux kernel, the following vulnerability has been resolved:

net/sched: Fix backlog accounting in qdisc\_dequeue\_internal

This issue applies for the following qdiscs: hhf, fq, fq\_codel, and
fq\_pie, and occurs in their change handlers when adjusting to the new
limit. The problem is the following in the values passed to the
subsequent qdisc\_tree\_reduce\_backlog call given a tbf parent:

   When the tbf parent runs out of tokens, skbs of these qdiscs will
   be placed in gso\_skb. Their peek handlers are qdisc\_peek\_dequeued,
   which accounts for both qlen and backlog. However, in the case of
   qdisc\_dequeue\_internal, ONLY qlen is accounted for when pulling
   from gso\_skb. This means that these qdiscs are missing a
   qdisc\_qstats\_backlog\_dec when dropping packets to satisfy the
   new limit in their change handlers.

   One can observe this issue with the following (with tc patched to
   support a limit of 0):

   export TARGET=fq
   tc qdisc del dev lo root
   tc qdisc add dev lo root handle 1: tbf rate 8bit burst 100b latency 1ms
   tc qdisc replace dev lo handle 3: parent 1:1 $TARGET limit 1000
   echo ''; echo 'add child'; tc -s -d qdisc show dev lo
   ping -I lo -f -c2 -s32 -W0.001 127.0.0.1 2\>&1 \>/dev/null
   echo ''; echo 'after ping'; tc -s -d qdisc show dev lo
   tc qdisc change dev lo handle 3: parent 1:1 $TARGET limit 0
   echo ''; echo 'after limit drop'; tc -s -d qdisc show dev lo
   tc qdisc replace dev lo handle 2: parent 1:1 sfq
   echo ''; echo 'post graft'; tc -s -d qdisc show dev lo

   The second to last show command shows 0 packets but a positive
   number (74) of backlog bytes. The problem becomes clearer in the
   last show command, where qdisc\_purge\_queue triggers
   qdisc\_tree\_reduce\_backlog with the positive backlog and causes an
   underflow in the tbf parent's backlog (4096 Mb instead of 0).

To fix this issue, the codepath for all clients of qdisc\_dequeue\_internal
has been simplified: codel, pie, hhf, fq, fq\_pie, and fq\_codel.
qdisc\_dequeue\_internal handles the backlog adjustments for all cases that
do not directly use the dequeue handler.

The old fq\_codel\_change limit adjustment loop accumulated the arguments to
the subsequent qdisc\_tree\_reduce\_backlog call through the cstats field.
However, this is confusing and error prone as fq\_codel\_dequeue could also
potentially mutate this field (which qdisc\_dequeue\_internal calls in the
non gso\_skb case), so we have unified the code here with other qdiscs.

## Affected and fixed versions

- Linux: \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< 65d1b5d84a0d697e9cfcdd0e07aad1bf1cb96295; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< dcfed7251e23cd71d32c4ecc444ff97992087e46; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< 38cdf8d1f5f3ee133f6e48dd422df4057fa9bfcb; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< a225f44d84b8900d679c5f5a9ea46fe9c0cc7802; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< 52bf272636bda69587952b35ae97690b8dc89941 (cvelist)
- Linux: 3.5 (cvelist)

## Mitigation

- Upgrade Linux to 52bf272636bda69587952b35ae97690b8dc89941 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-39677. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-39677.md
Affected: Linux >= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, < 65d1b5d84a0d697e9cfcdd0e07aad1bf1cb96295; >= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, < dcfed7251e23cd71d32c4ecc444ff97992087e46; >= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, < 38cdf8d1f5f3ee133f6e48dd422df4057fa9bfcb; >= 4b549a2ef4bef9965d97cbd…
Fixed in: Linux 65d1b5d84a0d697e9cfcdd0e07aad1bf1cb96295, Linux 38cdf8d1f5f3ee133f6e48dd422df4057fa9bfcb, Linux 52bf272636bda69587952b35ae97690b8dc89941

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-39677 being exploited?

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

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

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

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

Linux \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< 65d1b5d84a0d697e9cfcdd0e07aad1bf1cb96295; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< dcfed7251e23cd71d32c4ecc444ff97992087e46; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< 38cdf8d1f5f3ee133f6e48dd422df4057fa9bfcb; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< a225f44d84b8900d679c5f5a9ea46fe9c0cc7802; \>= 4b549a2ef4bef9965d97cbd992ba67930cd3e0fe, \< 52bf272636bda69587952b35ae97690b8dc89941; Linux 3.5.

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

Yes. Fixed in Linux 65d1b5d84a0d697e9cfcdd0e07aad1bf1cb96295, Linux 38cdf8d1f5f3ee133f6e48dd422df4057fa9bfcb, Linux 52bf272636bda69587952b35ae97690b8dc89941. Upgrade Linux to 52bf272636bda69587952b35ae97690b8dc89941 or later.

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

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/a225f44d84b8900d679c5f5a9ea46fe9c0cc7802>
- patch: <https://git.kernel.org/stable/c/52bf272636bda69587952b35ae97690b8dc89941>
- other: <https://git.kernel.org/stable/c/65d1b5d84a0d697e9cfcdd0e07aad1bf1cb96295>
- other: <https://git.kernel.org/stable/c/dcfed7251e23cd71d32c4ecc444ff97992087e46>
- other: <https://git.kernel.org/stable/c/38cdf8d1f5f3ee133f6e48dd422df4057fa9bfcb>

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

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