In the Linux kernel, the following vulnerability has been resolved: sched/core: Call wakeup_preempt() for queued tasks during class change
위협 신호 · CVSS · EPSS · KEV
이론적 심각도 점수
예측 데이터 없음
실측 악용 기록 없음
계획된 패치 주기 내 조치(60일 이내)
CVSS 벡터 · 메트릭
CVSS 벡터 정보 없음
상세 설명
In the Linux kernel, the following vulnerability has been resolved:
sched/core: Call wakeup_preempt() for queued tasks during class change
Paul reported recent RCU changes exposed a lost resched where CPU idles
with a rcutorture thread waiting while being completely runnable.
Dumping the rq state at the time of idling with runnable tasks showed
the following:
rq->next_class = &fair_sched_class
rq->nr_running = 1
rq->cfs.h_nr_queued = 0
rq->rt.rt_nr_running = 1
Although the waiting task was an RT task, "rq->next_class" did not point
to rt_sched_class and was stuck at the lower priority fair_sched_class.
Inspecting sched_change_end() revealed the following race with
__sched_setscheduler() for queued, but non-running tasks:
1CPU0 CPU1 2==== ====__schedule()
1/* 2 * rq->donor is a fair task that blocks. 3 * rq->next_class = &fair_sched_class 4 */ 5 6rq_lock(rq0) 7 8pick_next_task() 9 /* nr_running = 0 */10 pick_task_fair()11 sched_balance_newidle()12 raw_spin_rq_unlock(rq0)13 rq_lock(rq0)14 15 activate_task(rq0, p)16 /* p is a fair task */17 rq0->nr_running++;18 rq0->cfs.h_nr_queued++;19 wakeup_preempt(rq, p)20 rq->next_class = &fair_sched_class21 resched_curr()22 23 rq_unlock(rq0)24 25 __sched_setscheduler(p)26 /* p is moved to SCHED_RR */27 task_rq_lock(p)28 sched_change_begin()29 30 rq0->cfs.h_nr_queued--;31 rq0->rt.rt_nr_running++;32 33 sched_change_end()34 /*35 * p->on_rq = 1 (ctx->queued)36 * but p is not rq->donor37 * (!ctx->running) hence38 * resched_curr() is and39 * rq->next_class upgrade is40 * skipped.41 */42 43 task_rq_unlock()44 45 raw_spin_rq_lock(rq0)46 47 /*48 * rq->nr_running = 149 * rq->cfs.h_nr_queued = 050 * rq->rt.rt_nr_running = 151 * rq->next_class = &fair_sched_class52 */53 54 if (rq->cfs.h_nr_queued && ...)55 /* Above is false */56 57 if (rq_modified_above(this_rq, &fair_sched_class))58 /* Also false since rq->next_class is still fair */59 60 /*61 * sched_balance_newidle() is considered to62 * have failed to pull any fair tasks and no63 * other wakeups were detected.64 */65 return NULL; /* pick_task_fair() */66 67pick_task_idle()68 return rq->idle;69 70next = rq->idle;71 72/* Preemption indicators are lost */73clear_tsk_need_resched(prev);74clear_preempt_need_resched();75 76rq->curr = rq->idle;!!! rq->idle switches in with rq->running == 1 but !need_resched() !!!
In simple words, enqueue, followed by a class change of the newly queued
task goes unnoticed in rq->next_class indicator and
sched_balance_newidle() sees no fair task, nor any higher priority task
enqueued.
The above sequence will lead to CPU idling with a runnable task on the
CPU.
Call wakeup_preempt() for ctx->queued cases in sched_change_end() to
re-evaluate rq->next_class after class change (ENQUEUE_CLASS) and set
the NEED_RESCHED indicator accordingly.
Newidle balance will correctly see an enqueue of a higher priority
t
---truncated---
AI 심층 분석
공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.