CVE-2025-37953: sch_htb: make htb_deactivate() idempotent
In the Linux kernel, the following vulnerability has been resolved:
schhtb: make htbdeactivate() idempotent
Alan reported a NULL pointer dereference in htbnextrbnode() after we made htbqlennotify() idempotent.
It turns out in the following case it introduced some regression:
htbdequeuetree(): |-> fqcodeldequeue() |-> qdisctreereducebacklog() |-> htbqlennotify() |-> htbdeactivate() |-> htbnextrbnode() |-> htbdeactivate()
For htbnextrbnode(), after calling the 1st htbdeactivate(), the clprio[prio]->ptr could be already set to NULL, which means htbnextrbnode() is vulnerable here.
For htbdeactivate(), although we checked qlen before calling it, in case of qlen==0 after qdisctreereducebacklog(), we may call it again which triggers the warning inside.
To fix the issues here, we need to:
1) Make htbdeactivate() idempotent, that is, simply return if we already call it before. 2) Make htbnextrbnode() safe against ptr==NULL.
Many thanks to Alan for testing and for the reproducer.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
Linux kernelto a version that resolves this vulnerability.Patch sch_htb: make htb_deactivate() idempotent
Event History
Frequently Asked Questions
What is the severity of CVE-2025-37953?
CVE-2025-37953 is classified as a moderate severity vulnerability due to its potential exploitation via a NULL pointer dereference.
How does CVE-2025-37953 affect the Linux kernel?
CVE-2025-37953 affects the Linux kernel by introducing a regression in htb_next_rb_node() after the htb_qlen_notify() function was made idempotent.
How do I fix CVE-2025-37953?
To fix CVE-2025-37953, users should update their Linux kernel to a version where this vulnerability has been addressed.
What versions of the Linux kernel are affected by CVE-2025-37953?
CVE-2025-37953 affects various versions of the Linux kernel, especially those where htb_qlen_notify() was modified.
What are the consequences of not addressing CVE-2025-37953?
Failing to address CVE-2025-37953 may expose systems to potential crashes or integrity issues due to NULL pointer dereference.