В ядре Linux была устранена следующая уязвимость: sched/fair: Clear throttle state при выходе из fair class Task-based CFS throttling удаляет fair sched_entity задачи, в то время как ядро планировщика по-прежнему считает задачу поставленной в очередь. p->throttled переносит fair-specific state через операции dequeue/enqueue. DEQUEUE_CLASS удаляет задачу из cfs_rq->throttled_limbo_list, но сохраняет бит. Если последняя конечная квота CFS отключена, когда задача выполняется в другом классе, она отсутствует в разогретом ходу, и бит выживает. Возвращаясь к справедливой, в то время как cfs_bandwidth_used () является ложным, а затем выполняет реальный справедливый очередь с p->throttled по-прежнему установлен.
После того, как пропускная способность снова включена, очередь изменения класса рассматривает устаревший бит как состояние limbo и пропускает __dequeue_task(). Таким образом, p->se.on_rq остается заданным, а put_prev_task_fair() помещает сущность в дерево EEVDF, в то время как задача перемещается в RT. При выходе справедливый выборщик может выбрать задачу TASK_DEAD. __schedule() затем возвращается в do_task_dead(), который попадает в BUG().
Сохраняйте p->throttled через миграции и групповые движения, но очистите его на DEQUEUE_CLASS, потому что справедливое государство не должно переживать членство в справедливом классе. Более поздний возврат к ярмарке использует нормальный путь очереди. Этот путь по-прежнему уважает дросселированный cfs_rq.
Ядро KASAN, LOCKDEP и DEBUG_LIST v7.3 воспроизводили do_task_dead() BUG в корне 3/3, а 3/3 делегировал uid-1000 с CapPrmCapEff0 и RLIMIT_RTPRIO=1. Исправление прошло обе матрицы плюс управление коммутатором класса 3/3 с непрерывной пропускной способностью, без предупреждения планировщика, отчета KASAN, блокировки или сбоя. Помощник по кодированию AI проанализировал несоответствие состояний и составил исходный репродуктор, исправил кандидата и этот журнал изменений. Пути источника, триггер, элементы управления и результаты были перепроверены с указанными изменениями.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: sched/fair: Clear throttle state when leaving the fair class Task-based CFS bandwidth throttling removes a task's fair sched_entity while the scheduler core still considers the task queued. p->throttled carries the fair-specific state across dequeue/enqueue operations. DEQUEUE_CLASS removes the task from cfs_rq->throttled_limbo_list but retains the bit. If the last finite CFS quota is disabled while the task runs in another class, it is absent from the unthrottle walk and the bit survives. Returning to fair while cfs_bandwidth_used() is false then performs a real fair enqueue with p->throttled still set. After bandwidth is re-enabled, a class-change dequeue treats the stale bit as limbo state and skips __dequeue_task(). p->se.on_rq therefore remains set, and put_prev_task_fair() places the entity in the EEVDF tree while the task moves to RT. On exit, the fair picker can select the TASK_DEAD task. __schedule() then returns to do_task_dead(), which hits BUG(). Keep p->throttled across migrations and group moves, but clear it on DEQUEUE_CLASS because fair-specific state must not outlive fair-class membership. A later return to fair uses the normal enqueue path. That path still respects a throttled cfs_rq. A KASAN, LOCKDEP and DEBUG_LIST v7.3 kernel reproduced the do_task_dead() BUG in 3/3 root and 3/3 delegated uid-1000 runs with CapPrm=CapEff=0 and RLIMIT_RTPRIO=1. The fix passed both matrices plus a 3/3 class-switch control with bandwidth continuously enabled, without a scheduler warning, KASAN report, lockdep splat or crash. An AI coding assistant analyzed the state mismatch and drafted the initial reproducer, fix candidate and this changelog. The source paths, trigger, controls and results were rechecked against the cited revisions.