What’s Vulnerable › Vulnerabilities
CVE-2025-21965: sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl()
- 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-04-01 · updated 2026-07-30
- Weakness: CWE-476
Description
In the Linux kernel, the following vulnerability has been resolved: sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl() If a BPF scheduler provides an invalid CPU (outside the nr_cpu_ids range) as prev_cpu to scx_bpf_select_cpu_dfl() it can cause a kernel crash. To prevent this, validate prev_cpu in scx_bpf_select_cpu_dfl() and trigger an scx error if an invalid CPU is specified.
Affected products
- Linux kernel: from 6.12 before 6.12.20; from 6.13 before 6.13.8; 6.14-rc1, 6.14-rc2, 6.14-rc3, 6.14-rc4, 6.14-rc5, 6.14-rc6 — fixed in 6.12.20, 6.13.8
How to fix
Upgrade to a fixed version: Linux kernel 6.12.20, 6.13.8. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/515680e76c536dd4aa8e2b5d674b0d441baddf5b
- https://git.kernel.org/stable/c/752b56bb76e2471197d25d6948d85753043b10da
- https://git.kernel.org/stable/c/9360dfe4cbd62ff1eb8217b815964931523b75b3
Get alerted when CVE-2025-21965 or the next vulnerability affects your stack