# CVE-2025-21897: linux: In the Linux kernel, the following vulnerability has been resolved:  sched_ext: Fix pick_task_scx() picking non-queue...

CVE-2025-21897 is fixed in 36 products on 1 platform, first by DEBIAN-CVE-2025-21897, released April 1, 2025. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2025-21897
- Priority: Routine
- CVSS: 5.5 (medium)
- EPSS: 0.0015
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Apr 1, 2025

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

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | kernel-uek ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-core ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-core ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-core ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-core ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-devel ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-devel ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-core ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-core ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-deprecated ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-deprecated ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-desktop ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-desktop ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-extra ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-extra ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-extra-netfilter ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-extra-netfilter ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-usb ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-usb ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-wireless ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-debug-modules-wireless ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-devel ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-devel ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-doc ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-doc ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-core ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-core ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-deprecated ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-deprecated ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-desktop ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-desktop ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-extra ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-extra ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-extra-netfilter ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-extra-netfilter ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-usb ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-usb ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-wireless ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-modules-wireless ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-tools ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek-tools ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-core ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-core ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-devel ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-devel ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-core ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-core ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-deprecated ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-deprecated ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-desktop ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-desktop ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-extra ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-extra ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-extra-netfilter ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-extra-netfilter ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-usb ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-usb ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-wireless ol 10 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | kernel-uek64k-modules-wireless ol 9 | 0:6.12.0-101.33.4.3.el9uek | [ELSA-2025-20480](https://patchblox.com/security/data/fix/linux/elsa-2025-20480.md) | Jul 17, 2025 |
| Linux | linux Debian 13.5 (trixie) | 6.12.19-1 | [DEBIAN-CVE-2025-21897](https://patchblox.com/security/data/fix/linux/debian-cve-2025-21897.md) | Apr 1, 2025 |
| Linux | linux Debian 14 | 6.12.19-1 | [DEBIAN-CVE-2025-21897](https://patchblox.com/security/data/fix/linux/debian-cve-2025-21897.md) | Apr 1, 2025 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
