🇰🇷 한글 설명
Linux 커널의 sched_ext 구성 요소에서 헬퍼 kthread 생성 실패 시 scx_enable() 함수가 에러 포인터를 잘못 참조하여 시스템 크래시가 발생하는 취약점입니다. SIGQUIT(Ctrl+\) 신호로 인해 스레드 생성이 실패할 경우 에러 처리가 누락되어 발생합니다.
💡 쉬운 설명
컴퓨터의 작업 순서를 정하는 기능에서 오류가 발생했을 때, 이를 제대로 처리하지 못하고 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 특정 상황에서 작업 생성에 실패하면 시스템이 혼란에 빠져 충돌이 일어나는 현상입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
sched_ext: Fix scx_enable() crash on helper kthread creation failure
A crash was observed when the sched_ext selftests runner was
terminated with Ctrl+\ while test 15 was running:
NIP [c00000000028fa58] scx_enable.constprop.0+0x358/0x12b0
LR [c00000000028fa2c] scx_enable.constprop.0+0x32c/0x12b0
Call Trace:
scx_enable.constprop.0+0x32c/0x12b0 (unreliable)
bpf_struct_ops_link_create+0x18c/0x22c
__sys_bpf+0x23f8/0x3044
sys_bpf+0x2c/0x6c
system_call_exception+0x124/0x320
system_call_vectored_common+0x15c/0x2ec
kthread_run_worker() returns an ERR_PTR() on failure rather than NULL,
but the current code in scx_alloc_and_add_sched() only checks for a NULL
helper. Incase of failure on SIGQUIT, the error is not handled in
scx_alloc_and_add_sched() and scx_enable() ends up dereferencing an
error pointer.
Error handling is fixed in scx_alloc_and_add_sched() to propagate
PTR_ERR() into ret, so that scx_enable() jumps to the existing error
path, avoiding random dereference on failure.
📍 영향받는 시스템
Linux kernel (sched_ext 기능이 포함된 버전)
⚔️ 공격 벡터
로컬 사용자가 특정 신호(SIGQUIT 등)를 통해 스레드 생성을 강제로 실패시켜 시스템 크래시 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이상인지 확인