# CVE-2025-37797: net\_sched: hfsc: Fix a UAF vulnerability in class handling

> 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.33% (percentile 19, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-05-02T14:16:01.905Z
- **Modified:** 2026-08-05T11:57:36.042Z

## Who should check

- Anyone running Linux \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 28b09a067831f7317c3841812276022d6c940677; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 39b9095dd3b55d9b2743df038c32138efa34a9de; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< fcc8ede663569c704fb00a702973bd6c00373283; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 20d584a33e480ae80d105f43e0e7b56784da41b9; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 3aa852e3605000d5c47035c3fc3a986d14ccfa9f; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 86cd4641c713455a4f1c8e54c370c598c2b1cee0; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< bb583c88d23b72d8d16453d24856c99bd93dadf5; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 3df275ef0a6ae181e8428a6589ef5d5231e58b5c
- Anyone running Linux 4.14

## Description

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

net\_sched: hfsc: Fix a UAF vulnerability in class handling

This patch fixes a Use-After-Free vulnerability in the HFSC qdisc class
handling. The issue occurs due to a time-of-check/time-of-use condition
in hfsc\_change\_class() when working with certain child qdiscs like netem
or codel.

The vulnerability works as follows:
1. hfsc\_change\_class() checks if a class has packets (q.qlen != 0)
2. It then calls qdisc\_peek\_len(), which for certain qdiscs (e.g.,
   codel, netem) might drop packets and empty the queue
3. The code continues assuming the queue is still non-empty, adding
   the class to vttree
4. This breaks HFSC scheduler assumptions that only non-empty classes
   are in vttree
5. Later, when the class is destroyed, this can lead to a Use-After-Free

The fix adds a second queue length check after qdisc\_peek\_len() to verify
the queue wasn't emptied.

## Affected and fixed versions

- Linux: \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 28b09a067831f7317c3841812276022d6c940677; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 39b9095dd3b55d9b2743df038c32138efa34a9de; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< fcc8ede663569c704fb00a702973bd6c00373283; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 20d584a33e480ae80d105f43e0e7b56784da41b9; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 3aa852e3605000d5c47035c3fc3a986d14ccfa9f; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 86cd4641c713455a4f1c8e54c370c598c2b1cee0; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< bb583c88d23b72d8d16453d24856c99bd93dadf5; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 3df275ef0a6ae181e8428a6589ef5d5231e58b5c (cvelist)
- Linux: 4.14 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-37797.md
Affected: Linux >= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, < 28b09a067831f7317c3841812276022d6c940677; >= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, < 39b9095dd3b55d9b2743df038c32138efa34a9de; >= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, < fcc8ede663569c704fb00a702973bd6c00373283; >= 21f4d5cc25ec0e6e8eb8420…
Fixed in: Linux 28b09a067831f7317c3841812276022d6c940677, Linux 39b9095dd3b55d9b2743df038c32138efa34a9de, Linux 20d584a33e480ae80d105f43e0e7b56784da41b9, Linux 3aa852e3605000d5c47035c3fc3a986d14ccfa9f, Linux 86cd4641c713455a4f1c8e54c370c598c2b1cee0, Linux 3df275ef0a6ae181e8428a6589ef5d5231e58b5c

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

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

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

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

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

Linux \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 28b09a067831f7317c3841812276022d6c940677; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 39b9095dd3b55d9b2743df038c32138efa34a9de; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< fcc8ede663569c704fb00a702973bd6c00373283; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 20d584a33e480ae80d105f43e0e7b56784da41b9; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 3aa852e3605000d5c47035c3fc3a986d14ccfa9f; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 86cd4641c713455a4f1c8e54c370c598c2b1cee0; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< bb583c88d23b72d8d16453d24856c99bd93dadf5; \>= 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, \< 3df275ef0a6ae181e8428a6589ef5d5231e58b5c; Linux 4.14.

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

Yes. Fixed in Linux 28b09a067831f7317c3841812276022d6c940677, Linux 39b9095dd3b55d9b2743df038c32138efa34a9de, Linux 20d584a33e480ae80d105f43e0e7b56784da41b9, Linux 3aa852e3605000d5c47035c3fc3a986d14ccfa9f, Linux 86cd4641c713455a4f1c8e54c370c598c2b1cee0, Linux 3df275ef0a6ae181e8428a6589ef5d5231e58b5c. Upgrade Linux to 3df275ef0a6ae181e8428a6589ef5d5231e58b5c or later.

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

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/28b09a067831f7317c3841812276022d6c940677>
- patch: <https://git.kernel.org/stable/c/39b9095dd3b55d9b2743df038c32138efa34a9de>
- patch: <https://git.kernel.org/stable/c/fcc8ede663569c704fb00a702973bd6c00373283>
- patch: <https://git.kernel.org/stable/c/20d584a33e480ae80d105f43e0e7b56784da41b9>
- patch: <https://git.kernel.org/stable/c/3aa852e3605000d5c47035c3fc3a986d14ccfa9f>
- patch: <https://git.kernel.org/stable/c/86cd4641c713455a4f1c8e54c370c598c2b1cee0>
- patch: <https://git.kernel.org/stable/c/bb583c88d23b72d8d16453d24856c99bd93dadf5>
- patch: <https://git.kernel.org/stable/c/3df275ef0a6ae181e8428a6589ef5d5231e58b5c>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.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-37797>

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