CVE-2025-37797 net_sched: hfsc: Fix a UAF vulnerability in class handling
A use-after-free flaw in the Linux kernel's HFSC qdisc allows local attackers to potentially execute code or escalate privileges via race conditions.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-37797?
CVE-2025-37797 is a high-severity use after free vulnerability in Debian Debian Linux, published on 2 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-416
Which versions are affected by CVE-2025-37797?
It affects 2 products.
Linux distribution packages (2)
kernel-livepatch-SLE15-SP3_Update_59 SUSE:Linux Enterprise Live Patching 15 SP3 | All versions | 2-150300.2.1 |
kernel-livepatch-SLE15-SP5_Update_28 SUSE:Linux Enterprise Live Patching 15 SP5 | All versions | 2-150500.2.1 |
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2025-37797?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2025-37797 being exploited?
There is no known exploitation of CVE-2025-37797 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as BELL-CVE-2025-37797, DEBIAN-CVE-2025-37797, GHSA-hvr4-ppmm-c7fp, ROOT-OS-DEBIAN-12-CVE-2025-37797, ROOT-OS-UBUNTU-2204-CVE-2025-37797, ROOT-OS-UBUNTU-2404-CVE-2025-37797 and 3 more.