# CVE-2025-21965: sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-04-01T15:47:01.129Z
- Modified: 2026-08-05T11:55:41.135Z
- Weaknesses: CWE-476
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from f0e1a0643a59bf1f922fa209cec86a170b784f3f before 752b56bb76e2471197d25d6948d85753043b10da; from f0e1a0643a59bf1f922fa209cec86a170b784f3f before 515680e76c536dd4aa8e2b5d674b0d441baddf5b; from f0e1a0643a59bf1f922fa209cec86a170b784f3f before 9360dfe4cbd62ff1eb8217b815964931523b75b3; 6.12 (not affected: before 6.12; from 6.12.20 up to 6.12.*; from 6.13.8 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 6.12 before 6.12.20; from 6.13 before 6.13.8; 6.14

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/752b56bb76e2471197d25d6948d85753043b10da> (patch)
- <https://git.kernel.org/stable/c/515680e76c536dd4aa8e2b5d674b0d441baddf5b> (patch)
- <https://git.kernel.org/stable/c/9360dfe4cbd62ff1eb8217b815964931523b75b3> (patch)

## Sources

- CVE List: [CVE-2025-21965](https://www.cve.org/CVERecord?id=CVE-2025-21965), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-21965](https://nvd.nist.gov/vuln/detail/CVE-2025-21965), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-21965 · Whole record: https://cve.day/CVE-2025-21965.json · Rebuilt by cve.day 2026-11-25T22:58:55.913Z
