# CVE-2025-39780: sched/ext: Fix invalid task state transitions on class switch

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **Published:** 2025-09-11T16:56:31.142Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= a8532fac7b5d27b8d62008a89593dccb6f9786ef, \< 786f6314604b34c3e7de5f733f4e08e35c448a50; \>= a8532fac7b5d27b8d62008a89593dccb6f9786ef, \< 6a32cbe95029ebe21cc08349fd7ef2a3d32d2043; \>= a8532fac7b5d27b8d62008a89593dccb6f9786ef, \< ddf7233fcab6c247379d0928d46cc316ee122229
- Anyone running Linux 6.12

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

## Affected and fixed versions

- Linux: \>= a8532fac7b5d27b8d62008a89593dccb6f9786ef, \< 786f6314604b34c3e7de5f733f4e08e35c448a50; \>= a8532fac7b5d27b8d62008a89593dccb6f9786ef, \< 6a32cbe95029ebe21cc08349fd7ef2a3d32d2043; \>= a8532fac7b5d27b8d62008a89593dccb6f9786ef, \< ddf7233fcab6c247379d0928d46cc316ee122229 (cvelist)
- Linux: 6.12 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-39780. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-39780.md
Affected: Linux >= a8532fac7b5d27b8d62008a89593dccb6f9786ef, < 786f6314604b34c3e7de5f733f4e08e35c448a50; >= a8532fac7b5d27b8d62008a89593dccb6f9786ef, < 6a32cbe95029ebe21cc08349fd7ef2a3d32d2043; >= a8532fac7b5d27b8d62008a89593dccb6f9786ef, < ddf7233fcab6c247379d0928d46cc316ee122229; Linux 6.12
Fixed in: Linux 786f6314604b34c3e7de5f733f4e08e35c448a50, Linux 6a32cbe95029ebe21cc08349fd7ef2a3d32d2043

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-39780 being exploited?

There is no confirmed exploitation: CVE-2025-39780 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-39780?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-39780?

Linux \>= a8532fac7b5d27b8d62008a89593dccb6f9786ef, \< 786f6314604b34c3e7de5f733f4e08e35c448a50; \>= a8532fac7b5d27b8d62008a89593dccb6f9786ef, \< 6a32cbe95029ebe21cc08349fd7ef2a3d32d2043; \>= a8532fac7b5d27b8d62008a89593dccb6f9786ef, \< ddf7233fcab6c247379d0928d46cc316ee122229; Linux 6.12.

### Is there a fix for CVE-2025-39780?

Yes. Fixed in Linux 786f6314604b34c3e7de5f733f4e08e35c448a50, Linux 6a32cbe95029ebe21cc08349fd7ef2a3d32d2043. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-39780?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/786f6314604b34c3e7de5f733f4e08e35c448a50>
- patch: <https://git.kernel.org/stable/c/6a32cbe95029ebe21cc08349fd7ef2a3d32d2043>
- patch: <https://git.kernel.org/stable/c/ddf7233fcab6c247379d0928d46cc316ee122229>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-39780>

HTML: <https://flawdb.com/CVE-2025-39780> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-39780>
