Cloudanix VulnDB

CVE-2025-39780

None

CVSS

—

EPSS

0.2%

Published

Sep 11, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the Linux kernel could cause errors when advanced scheduling features are turned on, potentially leading to system warnings or instability until the kernel is updated.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Denial Of Service
Component
OS kernel
Class
Race Condition
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw permits invalid task state transitions (such as 0->3) for already-dead tasks during scheduling class switches in sched_ext, skipping necessary initialization checks and emitting kernel warnings from scx_set_task_state.

Why it matters to the business

Systems using custom extended schedulers may experience repeated kernel warnings or instability during scheduler enablement or CPU hotplug events, increasing operational risk and requiring kernel updates that can disrupt workloads until applied.

How an attack unfolds

An attacker or local process triggers sched_ext scheduler enablement via BPF struct_ops while tasks are in transitional or dead states, bypassing dead-task exclusion logic and forcing invalid state transitions that surface as warnings.

How to fix it

Update the Linux kernel to a version containing commit 786f6314604b34c3e7de5f733f4e08e35c448a50 or later; rebuild and deploy the fixed kernel across affected systems.

How to confirm the fix worked

Confirm the running kernel includes commit 786f6314604b34c3e7de5f733f4e08e35c448a50; reproduce the hotplug selftest without triggering the scx_set_task_state warning.

Typical attack path

  1. Load or attach a sched_ext BPF scheduler
  2. Trigger scheduling class transitions for tasks with zero usage counters
  3. Induce repeated enable/disable cycles or CPU hotplug events
  4. Observe kernel warnings from invalid state transitions

How to detect it

Search kernel logs for the exact warning string 'Invalid task state transition' combined with 'scx_set_task_state'; inspect BPF and scheduler enablement events around the time of the warning.

  • sched_ext: Invalid task state transition
  • WARNING: CPU.*scx_set_task_state
  • scx_enable_task

What your security team should do

  • Prioritize kernel upgrade to the fixed commit on all systems that may load sched_ext schedulers
  • Monitor for the specific warning string during scheduler enablement testing
  • Restrict unprivileged BPF loading until kernels are updated

The record

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 packages

Ecosystem Package Introduced Fixed
Debian:13 linux 0 No fix
Debian:14 linux 0 No fix
Debian:14 linux 0 6.16.5-1
Linux Kernel 6.12.0 6.12.44

Related vulnerabilities