CVE-2025-37797

net_sched: hfsc: Fix a UAF vulnerability in class handling

State
Published
Severity
7.8 High
Published
May 2, 2025
Updated
Aug 5, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

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

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 to before 28b09a067831f7317c3841812276022d6c940677Affected
  • 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 to before 39b9095dd3b55d9b2743df038c32138efa34a9deAffected
  • 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 to before fcc8ede663569c704fb00a702973bd6c00373283Affected
  • 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 to before 20d584a33e480ae80d105f43e0e7b56784da41b9Affected
  • 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 to before 3aa852e3605000d5c47035c3fc3a986d14ccfa9fAffected
  • 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 to before 86cd4641c713455a4f1c8e54c370c598c2b1cee0Affected
  • 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 to before bb583c88d23b72d8d16453d24856c99bd93dadf5Affected
  • 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 to before 3df275ef0a6ae181e8428a6589ef5d5231e58b5cAffected
LinuxLinux
  • 4.14Affected
  • before 4.14Not affected
  • 5.4.293 through 5.4.*Not affected
  • 5.10.237 through 5.10.*Not affected
  • 5.15.181 through 5.15.*Not affected
  • 6.1.136 through 6.1.*Not affected
  • 6.6.89 through 6.6.*Not affected
  • 6.12.26 through 6.12.*Not affected
  • 6.14.5 through 6.14.*Not affected
  • 6.15 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.