CVE-2025-37797: net_sched: hfsc: Fix a UAF vulnerability in class handling

Published May 2, 2025
·
Updated

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

netsched: 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 hfscchangeclass() when working with certain child qdiscs like netem or codel.

The vulnerability works as follows: 1. hfscchangeclass() checks if a class has packets (q.qlen != 0) 2. It then calls qdiscpeeklen(), 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 qdiscpeeklen() to verify the queue wasn't emptied.

Affected Software

20 affected components
Linux Linux kernel
Linux Linux kernel>=4.14.1<5.4.293
Linux Linux kernel>=5.5<5.10.237
Linux Linux kernel>=5.11<5.15.181
Linux Linux kernel>=5.16<6.1.136
Linux Linux kernel>=6.2<6.6.89
Linux Linux kernel>=6.7<6.12.26
Linux Linux kernel>=6.13<6.14.5
Linux Linux kernel=4.14
Linux Linux kernel=4.14-rc2
Linux Linux kernel=4.14-rc3
Linux Linux kernel=4.14-rc4
Linux Linux kernel=4.14-rc5
Linux Linux kernel=4.14-rc6
Linux Linux kernel=4.14-rc7
Linux Linux kernel=4.14-rc8
Linux Linux kernel=6.15-rc1
Linux Linux kernel=6.15-rc2
Linux Linux kernel=6.15-rc3
Debian Debian Linux=11.0

Event History

May 2, 2025
CVE Published
via MITRE·02:16 PM
Data Sourced
via MITRE·02:16 PM
Description
Data Sourced
via Red Hat·03:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-37797?

CVE-2025-37797 has been classified as a high severity vulnerability due to its potential to allow remote code execution.

2

How do I fix CVE-2025-37797?

To fix CVE-2025-37797, upgrade your Linux kernel to the latest stable version where the vulnerability has been patched.

3

Who is affected by CVE-2025-37797?

CVE-2025-37797 affects all distributions of the Linux kernel that utilize the hfsc qdisc class handling.

4

What type of vulnerability is CVE-2025-37797?

CVE-2025-37797 is identified as a Use-After-Free (UAF) vulnerability, which can lead to arbitrary code execution.

5

Is there a workaround for CVE-2025-37797?

Currently, the best mitigation for CVE-2025-37797 is to apply the kernel patch or upgrade to a patched version.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203