Skip to main content
Mallory
MediumPublic exploitVulnerability

CVE-2025-38001: Use-after-free and infinite loop in Linux kernel HFSC scheduling

Published Jun 6, 2025 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS5.5Medium · v3.1
EPSS0.38%24th percentile
CISA KEVNoNot listed
In the wildReported1 exploitation record in Mallory
Vendors
Debian ProjectLinux
IdentifiersCVE-2025-38001CWE-416

CVE-2025-38001 is a Linux kernel HFSC traffic-control vulnerability in which reentrant enqueue operations can insert the same class into the eligible tree (eltree) twice. An earlier protection checks cl->cl_nactive, which is incremented only by init_vf. HFSC_RSC processing instead invokes init_ed, bypassing that protection when NETEM is an HFSC child queueing discipline. Duplicate insertion can cause an infinite loop in hfsc_dequeue. Configuring a very-low-rate TBF root queueing discipline can prevent dequeueing, allowing subsequent tree insertions to trigger a use-after-free.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Exploitation can disrupt packet scheduling through an infinite loop in hfsc_dequeue and can trigger a kernel use-after-free when packet dequeueing is suppressed. These conditions threaten system availability and kernel memory safety. Code execution, privilege escalation, and information disclosure are not established for this vulnerability.

Mitigation

If you can’t patch tonight, do this now.

No vulnerability-specific workaround is established. Until patching is possible, limit untrusted access to affected systems and kernel attack surfaces. These exposure-reduction measures do not replace the corrected HFSC implementation.

Remediation

Patch, then assume compromise.

Install a vendor kernel update containing the fix that explicitly checks in hfsc_enqueue whether a class is already in the eltree whenever HFSC_RSC is set. Fixed releases include RHEL 9.2 kernel 5.14.0-284.128.1.el9_2, RHEL 9.2 real-time kernel 5.14.0-284.128.1.rt14.413.el9_2, RHEL 8.8 kernel 4.18.0-477.107.1.el8_8, and RHEL 8.6 kernel 4.18.0-372.158.1.el8_6. Apply the update appropriate to the deployed distribution and support stream, and reboot to activate the updated kernel. The earlier cl->cl_nactive-based fix alone is insufficient.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
cve-2025-38001This repository contains a full exploit chain for CVE-2025-38001, a use-after-free (UAF) vulnerability in the Linux kernel's HFSC (Hierarchical Fair Service Curve) qdisc implementation. The exploit targets Linux kernels 5.15, 6.1, and 6.6 (LTS) and is designed for local privilege escalation. The structure includes: - Multiple C source files implementing the exploit logic (notably `solution/exploit.c` and `exploit/lts-6.6.90/exploit.c`). - Netlink utility headers for low-level kernel communication. - Bash scripts (`shared/trigger.sh`, `shared/i.sh`) to set up the vulnerable traffic control environment on the loopback interface using `tc` and `ip` commands. - A minimal kernel module (`hevd/pagedev.c`) for heap manipulation. - Build scripts for compiling the exploit and setting up the environment, including Docker support for static builds. The exploit works by: 1. Setting up a specific qdisc/class/filter configuration on the loopback interface to trigger the UAF in the HFSC qdisc's eligible tree. 2. Manipulating kernel heap allocations to control the freed object. 3. Using signalfd and file structure manipulation to overwrite process credentials in kernel memory. 4. Gaining root privileges and spawning a root shell. The exploit is operational and provides a working local privilege escalation payload. It requires the ability to create user and network namespaces and access to the traffic control subsystem. The repository is well-structured, with clear separation between exploit logic, environment setup, and build tooling.khoatran107 · Disclosed Aug 25, 2025 · c · bash · localOperationalCVE-2025-38001Repository contains a local Linux kernel privilege-escalation PoC for CVE-2025-38001 (HFSC scheduler eltree/RB-tree use-after-free). Structure: (1) exploit.c is the main exploit implementing namespace sandboxing, heap grooming, vulnerability trigger, and privilege escalation; (2) netlink_utils.h provides minimal static-link-friendly Netlink/RTNETLINK helpers to craft and send traffic-control (qdisc/class) messages; (3) Makefile builds a static binary; (4) README.md (Indonesian) documents that it is for research/learning and shows a successful root escalation on kernel 6.1.0-30-amd64. Exploit capabilities and flow (high level): - Sets up a sandbox with unshare(CLONE_NEWNS|CLONE_NEWUSER|CLONE_NEWNET), writes /proc/self/setgroups, /proc/self/uid_map, /proc/self/gid_map, and raises RLIMIT_NOFILE to allow many FDs. - Uses RTNETLINK (NETLINK_ROUTE) to create many dummy network interfaces and configure traffic control objects (qdisc/classes). The code includes handlers for qdisc/class types: tbf, hfsc, and netem, indicating it programs HFSC structures to reach the vulnerable code path. - Performs heap shaping/spraying using AF_PACKET PACKET_TX_RING allocations (page-vector allocations) and heavy FD spraying with pipes and signalfd objects. - After triggering the HFSC UAF, it searches sprayed memory (via pipe reads) for a marker pattern and then performs repeated partial overwrites by manipulating file->private_data to point into cred fields, using signalfd allocations to drive writes that zero out credential fields (the snippet indicates writing task credentials to zero via signalfd4()). - On success, it opens /proc/sys/kernel/modprobe (likely as a privilege/primitive check) and spawns an interactive root shell via system("/bin/sh"). No external network C2 endpoints are present; all interactions are local kernel interfaces (netlink, packet sockets, procfs).aexdyhaxor · Disclosed Mar 12, 2026 · c · makefile · localOperationalCVE-2025-38001This repository contains a local privilege escalation exploit for CVE-2025-38001, a use-after-free vulnerability in the Linux kernel's HFSC eltree code. The exploit is implemented in C (exploit.c) and is supported by a header file (netlink_utils.h) that provides utilities for communicating with the kernel via Netlink sockets. The Makefile compiles the exploit statically. The README.md provides background, usage notes, and references to the vulnerability analysis and upstream kernel fix. The exploit works by manipulating network interfaces and traffic control (tc) subsystems via Netlink, creating a use-after-free condition in kernel memory. It leverages user namespaces and sandboxing to set up the environment, then performs heap spraying and object manipulation to overwrite task credentials, ultimately spawning a root shell. The exploit is designed for Debian 12 and kernelCTF instances but may be adapted to other Linux distributions with minor changes. Fingerprintable endpoints include several /proc files used for namespace and privilege manipulation, and /proc/sys/kernel/modprobe, which is often targeted in Linux privilege escalation exploits. The attack vector is local, requiring the attacker to execute code on the target system. The exploit is a proof-of-concept (POC) and demonstrates successful privilege escalation to root.0xdevil · Disclosed Jul 11, 2025 · c · makefile · localPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Debian ProjectDebian Linuxoperating_system
LinuxLinux Kerneloperating_system
FAQ

Frequently asked questions

Is CVE-2025-38001 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild.
Is there a public exploit for CVE-2025-38001?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2025-38001, the earliest disclosed Jul 11, 2025.
Is there a patch for CVE-2025-38001?
Install a vendor kernel update containing the fix that explicitly checks in hfsc_enqueue whether a class is already in the eltree whenever HFSC_RSC is set. Fixed releases include RHEL 9.2 kernel 5.14.0-284.128.1.el9_2, RHEL 9.2 real-time kernel 5.14.0-284.128.1.rt14.413.el9_2, RHEL 8.8 kernel 4.18.0-477.107.1.el8_8, and RHEL 8.6 kernel 4.18.0-372.158.1.el8_6.
What products are affected by CVE-2025-38001?
Linux Kernel and Debian Project Debian Linux.
How severe is CVE-2025-38001?
CVE-2025-38001 has a CVSS v3.1 score of 5.5 (Medium) and an EPSS score of 0.38% (24th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

38 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+15 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity16Community discussion across Reddit, Mastodon, and other social sources.