Skip to contentSkip to conversation

CVE-2026-99105: sched_ext: Fix stall when a task enqueued with SCX_ENQ_LAST lands back on its CPU's local DSQ

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

sched_ext: Fix stall when a task enqueued with SCX_ENQ_LAST lands back on its CPU's local DSQ

With SCX_OPS_ENQ_LAST, the last runnable task on a CPU is passed to ops.enqueue() instead of being kept running. Exiting tasks without SCX_OPS_ENQ_EXITING, migration disabled tasks without SCX_OPS_ENQ_MIGRATION_DISABLED and tasks on an offline rq skip ops.enqueue() and go straight to the local DSQ. This happens in put_prev_task_scx() after the pick has settled on idle, so nothing reschedules the CPU, which idles with the task queued until an unrelated wakeup lands on it or the watchdog fires.

scx_mitosis, which sets SCX_OPS_ENQ_LAST without SCX_OPS_ENQ_EXITING, hit this during mass cgroup teardown: exiting tasks stuck in exit_mmap() for over 40 seconds.

A task put on the local DSQ runs, as anywhere else. If the SCX_ENQ_LAST enqueue left the task on this CPU's local DSQ, set need_resched on the task being switched in, as proxy_resched_idle() does. resched_curr() would flag the task being put instead, and __schedule() clears that right after the pick.

The Linux kernel CVE team has assigned CVE-2026-99105 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.12 with commit f0e1a0643a59bf1f922fa209cec86a170b784f3f and fixed in 6.18.59 with commit 8d891c218016b6145993e082e7f732cb69dd0e29
	Issue introduced in 6.12 with commit f0e1a0643a59bf1f922fa209cec86a170b784f3f and fixed in 7.2.13 with commit 396ba6f04da3fd1fb5a3d1c9535bef3f967f4e59
	Issue introduced in 6.12 with commit f0e1a0643a59bf1f922fa209cec86a170b784f3f and fixed in 7.3 with commit 7a9df76679633cf26e0fea882a684012c6ec245a

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99105

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
kernel/sched/ext/ext.c
kernel/sched/ext/internal.h

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/8d891c218016b6145993e082e7f732cb69dd0e29
	https://git.kernel.org/stable/c/396ba6f04da3fd1fb5a3d1c9535bef3f967f4e59
	https://git.kernel.org/stable/c/7a9df76679633cf26e0fea882a684012c6ec245a