Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2025-21897

MEDIUM 5.5EPSS 7%

sched_ext: Fix pick_task_scx() picking non-queued tasks when it's called without balance()

Mitigation

  • Upgrade Linux to 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5 or later.

Who should check

  • Anyone running Linux >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 5324c459f90d16b0c43a78b494c598915d782b7a; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < de60a31cb0bcacfaf9487546eac5e70e0a9c66d7; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5
  • Anyone running Linux 6.12

Vulnerability facts

Affected
Linux >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 5324c459f90d16b0c43a78b494c598915d782b7a; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < de60a31cb0bcacfaf9487546eac5e70e0a9c66d7; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5; Linux 6.12
Fixed in
Linux 5324c459f90d16b0c43a78b494c598915d782b7a, Linux 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: None
  • Integrity impact: None
  • Availability impact: High
EPSS
0.21% chance of exploitation in 30 days (percentile 7, 2026-11-26)
CWE
CWE-667
Published
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: sched_ext: Fix pick_task_scx() picking non-queued tasks when it's called without balance() a6250aa251ea ("sched_ext: Handle cases where pick_task_scx() is called without preceding balance_scx()") added a workaround to handle the cases where pick_task_scx() is called without prececing balance_scx() which is due to a fair class bug where pick_taks_fair() may return NULL after a true return from balance_fair(). The workaround detects when pick_task_scx() is called without preceding balance_scx() and emulates SCX_RQ_BAL_KEEP and triggers kicking to avoid stalling. Unfortunately, the workaround code was testing whether @prev was on SCX to decide whether to keep the task running. This is incorrect as the task may be on SCX but no longer runnable. This could lead to a non-runnable task to be returned from pick_task_scx() which cause interesting confusions and failures. e.g. A common failure mode is the task ending up with (!on_rq && on_cpu) state which can cause potential wakers to busy loop, which can easily lead to deadlocks. Fix it by testing whether @prev has SCX_TASK_QUEUED set. This makes @prev_on_scx only used in one place. Open code the usage and improve the comment while at it.

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 5324c459f90d16b0c43a78b494c598915d782b7a; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < de60a31cb0bcacfaf9487546eac5e70e0a9c66d7; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5—cvelist
Linux6.12—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

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

Details: https://flawdb.com/CVE-2025-21897.md
Affected: Linux >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 5324c459f90d16b0c43a78b494c598915d782b7a; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < de60a31cb0bcacfaf9487546eac5e70e0a9c66d7; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5; Linux 6.12
Fixed in: Linux 5324c459f90d16b0c43a78b494c598915d782b7a, Linux 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5

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.

References

FAQ

Is CVE-2025-21897 being exploited?

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

How serious is CVE-2025-21897?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2025-21897?

Linux >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 5324c459f90d16b0c43a78b494c598915d782b7a; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < de60a31cb0bcacfaf9487546eac5e70e0a9c66d7; >= a6250aa251eacaf3ebfcfe152a96a727fd483ecd, < 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5; Linux 6.12.

Is there a fix for CVE-2025-21897?

Yes. Fixed in Linux 5324c459f90d16b0c43a78b494c598915d782b7a, Linux 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5. Upgrade Linux to 8fef0a3b17bb258130a4fcbcb5addf94b25e9ec5 or later.

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

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.

Sponsors