CVE-2026-89520: sched/core: Make core-sched flips wait for in-flight selections
In the Linux kernel, the following vulnerability has been resolved:
sched/core: Make core-sched flips wait for in-flight selections
Core scheduling's picknexttask() operates on all sibling rqs under one acquisition of the shared core-wide lock. A ->picktask() that releases the rq lock leaves every sibling lock momentarily free, letting schedcoreflip(false) complete mid-selection and rebind rqlockp() under it. The selection resumes on the split locks, touching sibling state it no longer protects, and schedule() finally releases a lock that was never taken while leaking the one that was.
Count in-flight core-wide selections in the leader's rq->corepickinflight and make schedcoreflip() wait for the count to drain. The count only changes under the shared lock, which the flip holds while sampling, so no other ordering is needed. The wait can repeat while selections overlap, but the flip backs off between samples and flips are rare cookie-lifetime events.
schedcorecpudeactivate() moves the count to the new leader - a stale copy left behind would bias it forever if that CPU later returns as its own leader.
Affected Software
Event History
Frequently Asked Questions
What runtime condition is required for this issue to occur?
A core-wide task selection must be in progress while __sched_core_flip(false) runs. The selection must temporarily release an rq lock through ->pick_task(), allowing the flip to complete and rebind rq_lockp() before selection resumes.
What can happen if the race is triggered?
The resumed selection can operate using split locks while touching sibling runqueue state that is no longer protected. __schedule() can then release a lock it did not acquire and leak the lock that it did acquire.
Why does CPU deactivation matter to the fix?
During sched_core_cpu_deactivate(), the in-flight selection count must move to the new leader. Leaving a stale count on the old leader could permanently bias the count if that CPU later returns as its own leader.