🇰🇷 한글 설명
Linux 커널의 kprobes 기능에서 kprobe_blacklist를 처리할 때 RCU(Read-Copy-Update) 보호가 누락되어 발생하는 취약점입니다. 모듈이 언로드될 때 블랙리스트 항목이 즉시 해제되는데, 이때 동시에 해당 목록을 참조하면 해제된 메모리에 접근하는 Use-After-Free 오류가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제(커널)가 특정 기능을 차단하는 목록을 확인하는 도중, 목록이 갑자기 삭제되어 잘못된 메모리 주소를 읽게 되는 문제입니다. 이로 인해 시스템이 충돌하거나 보안 공격에 노출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
kprobes: Protect kprobe_blacklist with RCU
__within_kprobe_blacklist() traverses kprobe_blacklist without holding
kprobe_mutex. When a module is unloaded, kprobe_remove_area_blacklist()
removes blacklist entries and immediately frees them with kfree().
A concurrent call to within_kprobe_blacklist() can therefore dereference
freed memory.
Furthermore, within_kprobe_blacklist() can be called in atomic or
non-preemptible contexts where the sleeping kprobe_mutex cannot be taken.
Protect kprobe_blacklist with RCU. Use guard(rcu)() and
list_for_each_entry_rcu() for traversal, list_add_tail_rcu() for
insertions, list_del_rcu() for deletions, and kfree_rcu() to reclaim
entries safely after a grace period.
📍 영향받는 시스템
kprobes 기능을 사용하는 Linux Kernel (패치 적용 전 버전)
⚔️ 공격 벡터
커널 모듈의 로드/언로드와 kprobe 참조가 동시에 발생하는 레이스 컨디션을 이용한 메모리 오염
🛡️ 대응 방법
RCU 메커니즘(guard(rcu), list_for_each_entry_rcu 등)이 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 보안 패치 버전 이상인지 확인합니다.