🇰🇷 한글 설명
Linux 커널의 spinlock 디버깅 과정에서 do_raw_write_lock 함수 내 데이터 경합(Data-race) 취약점이 발견되었습니다. 특정 디버깅 단계에서 쓰기 작업이 원자적으로 처리되지 않아 여러 CPU 코어 간에 데이터 불일치가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 엔진인 리눅스 커널에서 여러 작업이 동시에 같은 데이터를 수정하려고 할 때 충돌이 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 예상치 못한 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
locking/spinlock/debug: Fix data-race in do_raw_write_lock
KCSAN reports:
BUG: KCSAN: data-race in do_raw_write_lock / do_raw_write_lock
write (marked) to 0xffff800009cf504c of 4 bytes by task 1102 on cpu 1:
do_raw_write_lock+0x120/0x204
_raw_write_lock_irq
do_exit
call_usermodehelper_exec_async
ret_from_fork
read to 0xffff800009cf504c of 4 bytes by task 1103 on cpu 0:
do_raw_write_lock+0x88/0x204
_raw_write_lock_irq
do_exit
call_usermodehelper_exec_async
ret_from_fork
value changed: 0xffffffff -> 0x00000001
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1103 Comm: kworker/u4:1 6.1.111
Commit 1a365e822372 ("locking/spinlock/debug: Fix various data races") has
adressed most of these races, but seems to be not consistent/not complete.
>From do_raw_write_lock() only debug_write_lock_after() part has been
converted to WRITE_ONCE(), but not debug_write_lock_before() part.
Do it now.
📍 영향받는 시스템
Linux kernel (KCSAN이 보고한 6.1.111 버전 포함 관련 버전)
⚔️ 공격 벡터
로컬 시스템에서 커널의 동시성 제어 로직을 악용하여 시스템 불안정성을 유도하는 방식
🛡️ 대응 방법
커널 패치(Commit 1a365e822372 관련 수정 사항 포함)를 적용하여 최신 안정화 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 확인