CVE-2025-37797: net_sched: hfsc: Fix a UAF vulnerability in class handling
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.
Security readout for executives and security teams
Plain-English summary
A flaw in Linux traffic scheduling can leave freed kernel memory referenced after an HFSC queue changes unexpectedly. A local attacker meeting the required access conditions could potentially crash the system or affect confidentiality and integrity. Exposure is configuration-dependent, and the supplied sources do not establish active exploitation.
Executive priority
Treat as a high-priority, configuration-dependent kernel update. Accelerate remediation for shared, multi-user, container-hosting, or otherwise locally exposed systems using HFSC. Other systems should follow normal expedited kernel patching after confirming vendor applicability. No supplied evidence supports declaring an active emergency exploitation campaign.
Technical view
A time-of-check/time-of-use flaw exists in hfsc_change_class(). After confirming a class queue is non-empty, qdisc_peek_len() may cause child qdiscs such as codel or netem to drop the remaining packets. The class can then be incorrectly inserted into vttree, violating HFSC assumptions and enabling a later use-after-free during class destruction. The fix rechecks queue length after peeking.
Likely exposure
Potentially exposed systems run an affected Linux kernel and use HFSC with relevant child qdiscs, including codel or netem. The CVSS vector describes local, low-privilege attack access. Internet reachability alone does not establish exposure. The supplied affected-version data is ambiguous, so distribution-specific kernel status should be verified.
Exploitation context
The CVSS 3.1 score is 7.8, with local access, low complexity, low privileges, no user interaction, and potentially high confidentiality, integrity, and availability impact. The bundle marks this CVE as absent from KEV and provides no evidence of exploitation in the wild or a public exploit.
Researcher notes
The supplied version list appears flattened and does not clearly distinguish introduction points from fixed boundaries. Do not infer exact vulnerable ranges from it alone. The described corruption requires HFSC state plus a child qdisc whose peek operation can empty the queue. Stable-kernel commits and Debian advisories provide remediation anchors, but the bundle does not document exploit reproducibility.
Mitigation direction
Update to a vendor-supported kernel that incorporates the referenced stable fix.
Consult the Linux distribution's advisory to map fixed packages to deployed kernel versions.
Prioritize multi-user or tenant systems where untrusted users may reach local kernel networking functionality.
Where operationally feasible, avoid affected HFSC child-qdisc combinations until patched.
Validation and detection
Inventory kernel versions across Linux hosts and compare them with vendor advisories.
Identify systems configured with HFSC and child qdiscs such as codel or netem.
Confirm the installed kernel package includes the referenced upstream correction.
Reboot updated systems when required, then verify the running kernel version.
Monitor vendor advisories for corrected affected-version boundaries or revised exploitation information.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-37797 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
2ADP providers
11Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.