sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl()
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.20, 6.13.8
- CVEs
- CVE-2025-21965
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 18:54 UTC · Revision 1
Source evidence
sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl()
core-osv · Original sourcePublished 1 Apr 2025, 15:47 UTC
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.
osv:CVE-2025-21965
Kernel
Fixed versions: 6.12.20, 6.13.8
Complete source record
{
"id": "7bac685843e7589047d2597cb02e384397c0f72a87dd966a3572ff54948296bb",
"url": "https://osv.dev/vulnerability/CVE-2025-21965",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl()",
"summary": "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.",
"evidence": "osv:CVE-2025-21965",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.20",
"evidence": "/affected/1/ranges"
},
{
"value": "6.13.8",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-21965",
"aliases": [
"CVE-2025-21965"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "f0e1a0643a59bf1f922fa209cec86a170b784f3f"
},
{
"fixed": "752b56bb76e2471197d25d6948d85753043b10da"
},
{
"fixed": "515680e76c536dd4aa8e2b5d674b0d441baddf5b"
},
{
"fixed": "9360dfe4cbd62ff1eb8217b815964931523b75b3"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21965.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.12.0"
},
{
"fixed": "6.12.20"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.13.8"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21965.json"
}
}
],
"modified": "2026-10-28T02:30:51.538951799Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/515680e76c536dd4aa8e2b5d674b0d441baddf5b",
"https://git.kernel.org/stable/c/752b56bb76e2471197d25d6948d85753043b10da",
"https://git.kernel.org/stable/c/9360dfe4cbd62ff1eb8217b815964931523b75b3",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21965.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-21965",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21965.json"
}
},
"related_cves": [
{
"value": "CVE-2025-21965",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 520151,
"published_at": "2025-04-01T15:47:01.129+00:00"
}