🇰🇷 한글 설명
Linux 커널의 sched_ext 모듈에서 css_for_each_descendant_pre() 반복자가 참조 카운트를 증가시키지 않는데도 오류 경로에서 css_put()을 호출하여 refcount underflow를 발생시킵니다. 이는 Use-After-Free 취약점으로 이어질 수 있습니다.
💡 쉬운 설명
리눅스 커널의 메모리 관리 코드에서 같은 메모리를 두 번 해제하려고 시도하는 버그입니다. 이를 통해 공격자가 이미 해제된 메모리에 접근하여 시스템을 손상시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
sched_ext: Remove redundant css_put() in scx_cgroup_init()
The iterator css_for_each_descendant_pre() walks the cgroup hierarchy
under cgroup_lock(). It does not increment the reference counts on
yielded css structs.
According to the cgroup documentation, css_put() should only be used
to release a reference obtained via css_get() or css_tryget_online().
Since the iterator does not use either of these to acquire a reference,
calling css_put() in the error path of scx_cgroup_init() causes a
refcount underflow.
Remove the unbalanced css_put() to prevent a potential Use-After-Free
(UAF) vulnerability.
📍 영향받는 시스템
Linux kernel sched_ext 모듈이 활성화된 모든 버전 (패치 전)
⚔️ 공격 벡터
로컬 사용자가 scx_cgroup_init() 함수의 오류 경로를 트리거하여 refcount underflow 유발
🛡️ 대응 방법
커널을 최신 버전으로 업데이트하여 scx_cgroup_init() 함수에서 불균형한 css_put() 제거
🔧 검증 코드
커널 버전이 패치가 적용된 버전 이상인지 확인하거나, sched_ext 모듈의 css_put 호출을 grep으로 검사합니다.
cat /proc/version | grep -i linux && uname -r | grep -E '^[0-9]\.[0-9]+'