🇰🇷 한글 설명
Linux 커널의 sched_ext 구성 요소에서 cgroup 설정 시 scx_root 포인터를 rwsem 락을 획득하기 전에 미리 읽어 발생하는 Use-After-Free(UAF) 취약점입니다. 스케줄러가 교체되는 과정에서 이미 해제된 메모리 주소를 참조할 수 있어 시스템 불안정성이나 권한 상승을 초래할 수 있습니다.
💡 쉬운 설명
컴퓨터의 작업 순서를 정하는 프로그램이 교체되는 순간, 이미 사라진 옛날 정보를 참조하여 오류를 일으키는 문제입니다. 이로 인해 시스템이 멈추거나 해커가 시스템 제어권을 얻을 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
sched_ext: Read scx_root under scx_cgroup_ops_rwsem in cgroup setters
scx_group_set_{weight,idle,bandwidth}() cache scx_root before acquiring
scx_cgroup_ops_rwsem, so the pointer can be stale by the time the op runs.
If the loaded scheduler is disabled and freed (via RCU work) and another is
enabled between the naked load and the rwsem acquire, the reader sees
scx_cgroup_enabled=true (the new scheduler's) but dereferences the freed one
- UAF on SCX_HAS_OP(sch, ...) / SCX_CALL_OP(sch, ...).
scx_cgroup_enabled is toggled only under scx_cgroup_ops_rwsem write
(scx_cgroup_{init,exit}), so reading scx_root inside the rwsem read section
correlates @sch with the enabled snapshot.
📍 영향받는 시스템
sched_ext 기능이 포함된 Linux 커널 버전
⚔️ 공격 벡터
스케줄러를 빈번하게 활성화 및 비활성화하여 메모리 해제와 참조 사이의 타이밍 차이(Race Condition)를 이용한 공격
🛡️ 대응 방법
sched_ext 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인