CVE-2025-39780
published high CVSS 3.1 · 7.8sched/ext: Fix invalid task state transitions on class switch
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxa8532fac7b5d27b8d62008a89593dccb6f9786ef to < 786f6314604b34c3e7de5f733f4e08e35c448a50 · a8532fac7b5d27b8d62008a89593dccb6f9786ef to < 6a32cbe95029ebe21cc08349fd7ef2a3d32d2043 · a8532fac7b5d27b8d62008a89593dccb6f9786ef to < ddf7233fcab6c247379d0928d46cc316ee122229 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.12 (affected) · 0 to < 6.12 (unaffected · semver) · 6.12.44 through 6.12.* (unaffected · semver) · 6.16.4 through 6.16.* (unaffected · semver) · 6.17 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2025-1208 | Fixed | Not stated | Amazon Linux assessment |
| Debian | trixie | linux | Advisory build | 6.12.48-1 | DSA-6008-1 |
| Oracle Linux | 10 | kernel-uekaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uekx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
Show 97 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Oracle Linux | 10 | kernel-uek-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-corex86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debugaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debugx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-corex86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-develaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-develx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modulesaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modulesx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-corex86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-desktopaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-desktopx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extraaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extrax86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-usbaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-usbx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-wirelessaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-debug-modules-wirelessx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-develaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-develx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-docx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modulesaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modulesx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-corex86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-desktopaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-desktopx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-extraaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-extrax86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-usbaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-usbx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-wirelessaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-modules-wirelessx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-toolsaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek-toolsx86_64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64kaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-develaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-modulesaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-modules-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-modules-desktopaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-modules-extraaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-modules-usbaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 10 | kernel-uek64k-modules-wirelessaarch64 | Advisory build | 0:6.12.0-105.51.5.el10uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uekaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uekx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-corex86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debugaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debugx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-corex86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-develaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-develx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modulesaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modulesx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-corex86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-desktopaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-desktopx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extraaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extrax86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-usbaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-usbx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-wirelessaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-debug-modules-wirelessx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-develaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-develx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-docx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modulesaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modulesx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-coreaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-corex86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-deprecatedaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-deprecatedx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-desktopaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-desktopx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-extraaarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-extrax86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-extra-netfilteraarch64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
| Oracle Linux | 9 | kernel-uek-modules-extra-netfilterx86_64 | Advisory build | 0:6.12.0-105.51.5.el9uek | ELSA-2025-25754 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: sched/ext: Fix invalid task state transitions on class switch When enabling a sched_ext scheduler, we may trigger invalid task state transitions, resulting in warnings like the following (which can be easily reproduced by running the hotplug selftest in a loop): sched_ext: Invalid task state transition 0 -> 3 for fish[770] WARNING: CPU: 18 PID: 787 at kernel/sched/ext.c:3862 scx_set_task_state+0x7c/0xc0 ... RIP: 0010:scx_set_task_state+0x7c/0xc0 ... Call Trace: <TASK> scx_enable_task+0x11f/0x2e0 switching_to_scx+0x24/0x110 scx_enable.isra.0+0xd14/0x13d0 bpf_struct_ops_link_create+0x136/0x1a0 __sys_bpf+0x1edd/0x2c30 __x64_sys_bpf+0x21/0x30 do_syscall_64+0xbb/0x370 entry_SYSCALL_64_after_hwframe+0x77/0x7f This happens because we skip initialization for tasks that are already dead (with their usage counter set to zero), but we don't exclude them during the scheduling class transition phase. Fix this by also skipping dead tasks during class swiching, preventing invalid task state transitions.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The vulnerable path is entered through the local `bpf(BPF_LINK_CREATE)` syscall attaching a sched_ext struct_ops scheduler, combined with local task fork/exit churn to populate the race window. No network-reachable code is involved. AC:L - The attacker controls both sides of the race — generating a storm of exiting tasks (each of which sits on `scx_tasks` with `usage == 0` for a full RCU grace period, since `put_task_struct()` always defers via `call_rcu()`) while repeatedly enabling a scheduler; upstream states it is "easily reproduced by running the hotplug selftest in a loop". PR:L - Enabling a sched_ext scheduler needs only `bpf_token_capable(CAP_BPF)`, which is delegable to unprivileged users in user namespaces via BPF tokens (and is open on `unprivileged_bpf_disabled=0` systems); on deployments where a daemon such as scx_loader switches schedulers, a wholly unprivileged user supplies the dying-task half of the race. UI:N - The entire sequence — scheduler attach plus fork/exit churn — is driven by the attacker's own processes. No victim action is required. S:U - The corruption is confined to kernel scheduler state within the same security authority; no VM, IOMMU, or sandbox boundary is crossed. C:H - The code reads and writes a `task_struct` whose usage refcount has already reached zero and which is queued for RCU-deferred destruction — the exact condition the `Fixes:` commit identifies as a use-after-free hazard — and drives BPF `ops.enable()`/`ops.exit_task()` against a task with no allocated per-task context, exposing stale/foreign scheduler state. I:H - `p->sched_class` (a pointer to the scheduling-class function-pointer dispatch table), `p->scx.slice`, and `p->scx.flags` are written into an object that is mid-teardown and pending free, and the sched_ext task state machine is forced through an illegal `NONE -> ENABLED` transition that corrupts BPF-scheduler per-task accounting. A:H - The bug triggers a `WARN_ONCE()` splat in `scx_set_task_state()`, which is an immediate kernel panic on the many hardened, cloud, Android, and CI configurations that set `panic_on_warn`; additionally the resulting contract violation makes real BPF schedulers call `scx_bpf_error()`, ejecting the scheduler and disrupting scheduling system-wide.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | a8532fac7b5d27b8d62008a89593dccb6f9786ef to < 786f6314604b34c3e7de5f733f4e08e35c448a50 (affected · git)a8532fac7b5d27b8d62008a89593dccb6f9786ef to < 6a32cbe95029ebe21cc08349fd7ef2a3d32d2043 (affected · git)a8532fac7b5d27b8d62008a89593dccb6f9786ef to < ddf7233fcab6c247379d0928d46cc316ee122229 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.12 (affected)0 to < 6.12 (unaffected · semver)6.12.44 through 6.12.* (unaffected · semver)6.16.4 through 6.16.* (unaffected · semver)6.17 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
sched/ext: Fix invalid task state transitions on class switch
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- cc7619d4fae4b9037ad1bfdb3b3dfe12431b30b4bc6a8386c92d657e961c86fb
- Ingested
- 23 Sep 2026, 08:47:06 UTC
- Source record
- Official CVE record