What’s Vulnerable › Vulnerabilities
CVE-2025-38012: sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-06-18 · updated 2026-07-30
- Weakness: CWE-908
Description
In the Linux kernel, the following vulnerability has been resolved: sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator BPF programs may call next() and destroy() on BPF iterators even after new() returns an error value (e.g. bpf_for_each() macro ignores error returns from new()). bpf_iter_scx_dsq_new() could leave the iterator in an uninitialized state after an error return causing bpf_iter_scx_dsq_next() to dereference garbage data. Make bpf_iter_scx_dsq_new() always clear $kit->dsq so that next() and destroy() become noops.
Affected products
- Linux kernel: from 6.12 before 6.12.30; from 6.13 before 6.14.8; 6.15-rc1, 6.15-rc2, 6.15-rc3, 6.15-rc4, 6.15-rc5, 6.15-rc6 — fixed in 6.12.30, 6.14.8
How to fix
Upgrade to a fixed version: Linux kernel 6.12.30, 6.14.8. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/0102989af4c334d1d98b2a0fd4d61a5152e39b72
- https://git.kernel.org/stable/c/255dd31bfc4a67a19b1fc2cd130a50284dadfe3a
- https://git.kernel.org/stable/c/428dc9fc0873989d73918d4a9cc22745b7bbc799
Get alerted when CVE-2025-38012 or the next vulnerability affects your stack