一、 漏洞 CVE-2025-37797 基础信息
漏洞信息
                                        # net_sched: hfsc: 修复类处理中的一个UAF漏洞

## 漏洞概述

Linux 内核中的 HFSC qdisc 类处理存在 Use-After-Free (UAF) 漏洞。该漏洞由 `hfsc_change_class()` 函数在处理特定子 qdisc(如 netem 或 codel)时的时间检查/时间使用条件问题引起。

## 影响版本

此漏洞存在于使用涉及特定 qdisc 的 HFSC 类处理的 Linux 内核版本中。

## 细节

漏洞的工作机制如下:
1. `hfsc_change_class()` 检查类是否有数据包(`q.qlen != 0`)。
2. 然后调用 `qdisc_peek_len()`,对于某些 qdisc(如 codel 或 netem),可能会丢弃数据包并清空队列。
3. 代码继续假设队列仍然非空,并将该类添加到 `vttree`。
4. 这违反了 HFSC 调度程序的假设,即只有非空类存在于 `vttree` 中。
5. 这导致在类被销毁时发生 Use-After-Free。

## 修复方案

修复方案在调用 `qdisc_peek_len()` 之后增加了第二个队列长度检查,以验证队列是否未被清空。

## 影响

该漏洞可能导致 Use-After-Free 错误,从而引发潜在的安全问题,如应用程序崩溃或可能的权限提升。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
net_sched: hfsc: Fix a UAF vulnerability in class handling
来源:美国国家漏洞数据库 NVD
漏洞描述信息
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.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
N/A
来源:美国国家漏洞数据库 NVD
漏洞标题
Linux kernel 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于hfsc_change_class中存在释放后重用。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2025-37797 的公开POC
# POC 描述 源链接 神龙链接
三、漏洞 CVE-2025-37797 的情报信息