CVE-2025-38001: net_sched: hfsc: Address reentrant enqueue adding class to eltree twice

Published Jun 6, 2025
·
Updated

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

netsched: hfsc: Address reentrant enqueue adding class to eltree twice

Savino says: "We are writing to report that this recent patch (141d34391abbb315d68556b7c67ad97885407547) [1] can be bypassed, and a UAF can still occur when HFSC is utilized with NETEM.

The patch only checks the cl->clnactive field to determine whether it is the first insertion or not [2], but this field is only incremented by initvf [3].

By using HFSCRSC (which uses inited) [4], it is possible to bypass the check and insert the class twice in the eltree. Under normal conditions, this would lead to an infinite loop in hfscdequeue for the reasons we already explained in this report [5].

However, if TBF is added as root qdisc and it is configured with a very low rate, it can be utilized to prevent packets from being dequeued. This behavior can be exploited to perform subsequent insertions in the HFSC eltree and cause a UAF."

To fix both the UAF and the infinite loop, with netem as an hfsc child, check explicitly in hfscenqueue whether the class is already in the eltree whenever the HFSCRSC flag is set.

[1] <a href="https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=141d34391abbb315d68556b7c67ad97885407547">https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=141d34391abbb315d68556b7c67ad97885407547</a> [2] <a href="https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/schhfsc.c#L1572">https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/schhfsc.c#L1572</a> [3] <a href="https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/schhfsc.c#L677">https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/schhfsc.c#L677</a> [4] <a href="https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/schhfsc.c#L1574">https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/schhfsc.c#L1574</a> [5] <a href="https://lore.kernel.org/netdev/8DuRWwfqjoRDLDmBMlIfbrsZg9Gx50DHJc1ilxsEBNe2D6NMoigReIRIG0LOjMc3r10nUUZtArXx4oZBIdUfZQrwjcQhdinnMis0G7VEk=@willsroot.io/T/#u">https://lore.kernel.org/netdev/8DuRWwfqjoRDLDmBMlIfbrsZg9Gx50DHJc1ilxsEBNe2D6NMoigReIRIG0LOjMc3r10nUUZtArXx4oZBIdUfZQrwjcQhdinnMis0G7VEk=@willsroot.io/T/#u</a>

Other sources

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

netsched: hfsc: Address reentrant enqueue adding class to eltree twice

Savino says: "We are writing to report that this recent patch (141d34391abbb315d68556b7c67ad97885407547) [1] can be bypassed, and a UAF can still occur when HFSC is utilized with NETEM.

The patch only checks the cl->clnactive field to determine whether it is the first insertion or not [2], but this field is only incremented by initvf [3].

By using HFSCRSC (which uses inited) [4], it is possible to bypass the check and insert the class twice in the eltree. Under normal conditions, this would lead to an infinite loop in hfscdequeue for the reasons we already explained in this report [5].

However, if TBF is added as root qdisc and it is configured with a very low rate, it can be utilized to prevent packets from being dequeued. This behavior can be exploited to perform subsequent insertions in the HFSC eltree and cause a UAF."

To fix both the UAF and the infinite loop, with netem as an hfsc child, check explicitly in hfscenqueue whether the class is already in the eltree whenever the HFSCRSC flag is set.

[1] https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=141d34391abbb315d68556b7c67ad97885407547 [2] https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/schhfsc.c#L1572 [3] https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/schhfsc.c#L677 [4] https://elixir.bootlin.com/linux/v6.15-rc5/source/net/sched/schhfsc.c#L1574 [5] https://lore.kernel.org/netdev/8DuRWwfqjoRDLDmBMlIfbrsZg9Gx50DHJc1ilxsEBNe2D6NMoigReIRIG0LOjMc3r10nUUZtArXx4oZBIdUfZQrwjcQhdinnMis0G7VEk=@willsroot.io/T/#u

NVD

Affected Software

18 affected components
Linux Linux kernel
Linux Linux kernel>=5.0.1<5.4.294
Linux Linux kernel>=5.5<5.10.238
Linux Linux kernel>=5.11<5.15.185
Linux Linux kernel>=5.16<6.1.141
Linux Linux kernel>=6.2<6.6.93
Linux Linux kernel>=6.7<6.12.32
Linux Linux kernel>=6.13<6.14.10
Linux Linux kernel>=6.15<6.15.1
Linux Linux kernel=5.0
Linux Linux kernel=5.0-rc3
Linux Linux kernel=5.0-rc4
Linux Linux kernel=5.0-rc5
Linux Linux kernel=5.0-rc6
Linux Linux kernel=5.0-rc7
Linux Linux kernel=5.0-rc8
Debian Debian Linux=11.0
Debian Debian Linux=12.0

Event History

Jun 6, 2025
CVE Published
via MITRE·01:41 PM
Data Sourced
via MITRE·01:41 PM
Description
Data Sourced
via Red Hat·02:03 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

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-38001?

The severity of CVE-2025-38001 is currently under analysis as it was recently patched in the Linux kernel.

2

How do I fix CVE-2025-38001?

To fix CVE-2025-38001, you should update your Linux kernel to the latest version where the vulnerability has been resolved.

3

Which versions of the Linux kernel are affected by CVE-2025-38001?

CVE-2025-38001 affects specific versions of the Linux kernel prior to the application of the relevant patch.

4

What type of vulnerability is CVE-2025-38001?

CVE-2025-38001 is a vulnerability in the net_sched component of the Linux kernel related to address reentrancy.

5

Is there a known exploit for CVE-2025-38001?

Currently, there are no public details indicating the existence of an exploit for CVE-2025-38001.

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