cve/2025/CVE-2025-37797.md
2025-09-29 21:09:30 +02:00

1.5 KiB

CVE-2025-37797

Description

In the Linux kernel, the following vulnerability has been resolved:net_sched: hfsc: Fix a UAF vulnerability in class handlingThis patch fixes a Use-After-Free vulnerability in the HFSC qdisc classhandling. The issue occurs due to a time-of-check/time-of-use conditionin hfsc_change_class() when working with certain child qdiscs like netemor 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 queue3. The code continues assuming the queue is still non-empty, adding the class to vttree4. This breaks HFSC scheduler assumptions that only non-empty classes are in vttree5. Later, when the class is destroyed, this can lead to a Use-After-FreeThe fix adds a second queue length check after qdisc_peek_len() to verifythe queue wasn't emptied.

POC

Reference

No PoCs from references.

Github