UAF and Infinite Loop Vulnerability in Linux Kernel HFSC with NETEM
Summary
CVE-2025-38001: In the Linux kernel, the following vulnerability has been resolved: net_sched: hfsc: Address reentrant enqueue adding class to eltree twice Savino says: "We are writing to report that this recent patch (141d34391abbb315d... Affects linux versions 5.10.103-1 – 6.9.9-1. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Linux kernel is a core component of many operating systems, providing essential services for hardware and software interaction. It supports various networking features, including the Hierarchical Fair Service Curve (HFSC) scheduler, which manages bandwidth allocation. This vulnerability affects HFSC when used with NETEM, potentially leading to severe issues such as user-after-free (UAF) errors and infinite loops.
Vulnerability Detail
In the Linux kernel, a vulnerability exists in the HFSC scheduler that allows for a user-after-free (UAF) condition when classes are added to the eltree multiple times. This issue arises from a patch that inadequately checks the class's state, allowing it to be inserted twice under certain conditions. The exploitation of this vulnerability can lead to an infinite loop in the hfsc_dequeue function, especially when a Token Bucket Filter (TBF) is configured with a low rate, preventing packets from being dequeued and causing system instability.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, you can avoid using HFSC with NETEM until the patch is applied. If you must use these features together, ensure that the HFSC_RSC flag is not set during class insertion to prevent the double insertion issue.
Conclusion
The vulnerability identified as CVE-2025-38001 in the Linux kernel's HFSC scheduler poses significant risks, including user-after-free errors and infinite loops. It is crucial to apply the necessary updates to mitigate these risks effectively. Users are encouraged to monitor their systems and utilize tools like Vulert for real-time vulnerability alerts.
See every vulnerability recorded for linux →
FAQ
The vulnerability can lead to user-after-free errors and infinite loops, potentially causing system crashes or instability.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The vulnerability affects multiple versions of the Linux kernel across Debian 11, 12, and 13.
Yes, updating to the latest patched version of the Linux kernel will resolve the vulnerability.
If an immediate update is not possible, consider avoiding the use of HFSC with NETEM as a temporary measure.
Related vulnerabilities
Recent vulnerabilities recorded for linux.