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

High 7.8 Published Updated

A missing validation in the Linux kernel scheduler allows a BPF scheduler to cause a kernel crash by providing an invalid CPU ID.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-21965?

CVE-2025-21965 is a high-severity vulnerability in Linux kernel, published on 1 Apr 2025. It can only be exploited from the same machine or local network, with no action from the victim.

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

Weakness: CWE-476

Which versions are affected by CVE-2025-21965?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21965?

Apply the vendor's patch.

Is CVE-2025-21965 being exploited?

There is no known exploitation of CVE-2025-21965 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21965, DEBIAN-CVE-2025-21965, GHSA-9gr8-3pvc-4w93, UBUNTU-CVE-2025-21965.

Is CVE-2025-21965 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free