CVE-2025-37797
net_sched: hfsc: Fix a UAF vulnerability in class handling
Reported by linux · Published May 2, 2025
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-libbpf-devel | Amazon Linux | 6.1.140-154.222.amzn2023 |
| perf6.12 | Amazon Linux | 6.12.29-33.102.amzn2023 |
| kernel-headers | Amazon Linux | 6.1.140-154.222.amzn2023 |
| python3-perf6.12 | Amazon Linux | 6.12.29-33.102.amzn2023 |
| kernel-tools-devel | Amazon Linux | 6.1.140-154.222.amzn2023 |
| kernel6.12-modules-extra | Amazon Linux | 6.12.29-33.102.amzn2023 |
| Linux | Linux | fcc8ede663569c704fb00a702973bd6c00373283, bb583c88d23b72d8d16453d24856c99bd93dadf5, 86cd4641c713455a4f1c8e54c370c598c2b1cee0, 4.14, 3df275ef0a6ae181e8428a6589ef5d5231e58b5c, 3aa852e3605000d5c47035c3fc3a986d14ccfa9f, 28b09a067831f7317c3841812276022d6c940677 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14, 21f4d5cc25ec0e6e8eb8420dd2c399e6d2fc7d14 |
| Linux | Linux | 4.14, 0, 5.4.293 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| Linux | Linux | 0, 6.15, 6.14.5 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel6.12 | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-tools | 0 |
| linux | linux_kernel | 4.14, 4.14, 4.14 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-livepatch-6.12.29-33.102 | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-livepatch-6.1.140-154.222 | 0 |
…and 3 more
Timeline
- May 2, 2025 CVE Published
- May 3, 2025 EPSS Score (30 in total, the first dated here)
- Dec 16, 2025 PoC Published
- Apr 29, 2026 Distribution Patch (217 in total, the first dated here)
- Apr 29, 2026 Security Advisory (250 in total, the first dated here)
- Jun 9, 2026 Coalition ESS Score
- Sep 22, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-37797
vulnetix vdb fixes CVE-2025-37797
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-37797/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart