🇰🇷 한글 설명
Linux 커널의 net/sched 구성 요소에서 action 삭제 시 IDR 오류 포인터를 적절히 처리하지 못하는 취약점이 발견되었습니다. 특정 상황에서 race condition이 발생하여 오류 포인터(ERR_PTR)를 유효한 객체로 오인하고 참조함으로써 커널 패닉을 유발할 수 있습니다.
💡 쉬운 설명
리눅스 운영체제의 네트워크 관리 기능에서 데이터 삭제 과정 중 충돌이 발생하면 시스템이 갑자기 멈추거나 꺼질 수 있는 오류입니다. 잘못된 메모리 주소를 참조하여 컴퓨터의 핵심 부분인 커널이 충돌하는 현상입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/sched: reject IDR error pointers when deleting actions
tcf_action_delete() drops the reference held by its lookup before calling
tcf_idr_delete_index() with the saved action index. An unlocked
classifier can remove that action and reserve the same IDR slot with
ERR_PTR(-EBUSY) in between.
tcf_idr_delete_index() only checks the lookup result for NULL. It
therefore treats the reservation as a tc_action and dereferences
tcfa_bindcnt. A hardware execution breakpoint was used to schedule the
interleaving without changing the kernel source. KASAN reported this
decoded trace:
BUG: KASAN: null-ptr-deref in tca_action_gd+0x5b9/0x1010
Read of size 4 at addr 0000000000000010 by task poc/150
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002
RIP: tca_action_gd+0x5c0/0x1010:
arch_atomic_read at arch/x86/include/asm/atomic.h:23
raw_atomic_read at include/linux/atomic/atomic-arch-fallback.h:457
atomic_read at include/linux/atomic/atomic-instrumented.h:33
tcf_idr_delete_index at net/sched/act_api.c:766
tcf_action_delete at net/sched/act_api.c:1859
tcf_del_notify at net/sched/act_api.c:2014
tca_action_gd at net/sched/act_api.c:2064
R13: 0000000000000010 R15: fffffffffffffff0
Kernel panic - not syncing: Fatal exception
R15 contains ERR_PTR(-EBUSY), and adding the tcfa_bindcnt offset produces
the address in R13. With the guard applied, the same reproducer returned
-ENOENT without a KASAN report or panic. Treat error pointers as absent
and return -ENOENT.
📍 영향받는 시스템
Linux Kernel (net/sched 관련 모듈 사용 시스템)
⚔️ 공격 벡터
로컬 사용자가 네트워크 스케줄링 액션을 삭제하는 과정에서 정밀하게 설계된 레이스 컨디션(Race Condition) 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 IDR 오류 포인터 처리 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.