CVE-2025-37797

HIGH

Linux Kernel - Use-After-Free in HFSC qdisc Class Handling

Title source: llm
STIX 2.1

Description

In the Linux kernel, the following vulnerability has been resolved: net_sched: hfsc: Fix a UAF vulnerability in class handling This patch fixes a Use-After-Free vulnerability in the HFSC qdisc class handling. The issue occurs due to a time-of-check/time-of-use condition in hfsc_change_class() when working with certain child qdiscs like netem or codel. The vulnerability works as follows: 1. hfsc_change_class() checks if a class has packets (q.qlen != 0) 2. It then calls qdisc_peek_len(), which for certain qdiscs (e.g., codel, netem) might drop packets and empty the queue 3. The code continues assuming the queue is still non-empty, adding the class to vttree 4. This breaks HFSC scheduler assumptions that only non-empty classes are in vttree 5. Later, when the class is destroyed, this can lead to a Use-After-Free The fix adds a second queue length check after qdisc_peek_len() to verify the queue wasn't emptied.

Scores

CVSS v3 7.8
EPSS 0.0008
EPSS Percentile 23.9%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Details

CWE
CWE-416
Status published
Products (29)
debian/debian_linux 11.0
linux/Kernel 4.14.0 - 5.4.293linux
linux/Kernel 5.11.0 - 5.15.181linux
linux/Kernel 5.16.0 - 6.1.136linux
linux/Kernel 5.5.0 - 5.10.237linux
linux/Kernel 6.13.0 - 6.14.5linux
linux/Kernel 6.2.0 - 6.6.89linux
linux/Kernel 6.7.0 - 6.12.26linux
Linux/Linux < 4.14
Linux/Linux 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 - 20d584a33e480ae80d105f43e0e7b56784da41b9
... and 19 more
Published May 02, 2025
Tracked Since Feb 18, 2026