CVE-2021-47125

sch_htb: fix refcount leak in htb_parent_to_leaf_offload

MEDIUM
5.5
CVSS Score
Published: March 15, 2024 at 08:14 PM UTC
Updated: June 17, 2026 at 04:16 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: sch_htb: fix refcount leak in htb_parent_to_leaf_offload The commit ae81feb7338c ("sch_htb: fix null pointer dereference on a null new_q") fixes a NULL pointer dereference bug, but it is not correct. Because htb_graft_helper properly handles the case when new_q is NULL, and after the previous patch by skipping this call which creates an inconsistency : dev_queue->qdisc will still point to the old qdisc, but cl->parent->leaf.q will point to the new one (which will be noop_qdisc, because new_q was NULL). The code is based on an assumption that these two pointers are the same, so it can lead to refcount leaks. The correct fix is to add a NULL pointer check to protect qdisc_refcount_inc inside htb_parent_to_leaf_offload.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.12 ≤ v < 5.12.105.12 ≤ v < 5.135.13 rc15.13 rc25.13 rc35.13 rc4ae81feb7338c89cee4e6aa0424bdab2ce2b52da2
Vendor states this is fixed in 2411c02d03892a5057499f8102d0cc1e0f852416 (fixed)
Vendor states this is fixed in 944d671d5faa0d78980a3da5c0f04960ef1ad893 (fixed)
Vendor states this is fixed in 5.12 (unaffected)
Vendor states this is fixed in 5.12.10 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2411c02d03892a5057499f8102d0cc1e0f852416
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/944d671d5faa0d78980a3da5c0f04960ef1ad893

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
NVD-CWE-Other

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card