🇰🇷 한글 설명
Linux 커널의 netpoll 모듈에서 netpoll_owner_active() 함수가 napi->poll_owner 필드를 원자적(atomic)이지 않은 방식으로 접근하여 발생하는 race condition 취약점입니다. 인터럽트 핸들러와 태스크 간 동시 접근으로 인해 메모리 값이 예기치 않게 변경될 수 있습니다.
💡 쉬운 설명
Linux 커널의 네트워크 처리 부분에서 여러 프로세스가 동시에 같은 데이터에 접근할 때 발생하는 동시성 문제입니다. 특정 메모리 위치의 값이 예측 불가능하게 변경되어 시스템 안정성을 해칠 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netpoll: Fix race condition in netpoll_owner_active
KCSAN detected a race condition in netpoll:
BUG: KCSAN: data-race in net_rx_action / netpoll_send_skb
write (marked) to 0xffff8881164168b0 of 4 bytes by interrupt on cpu 10:
net_rx_action (./include/linux/netpoll.h:90 net/core/dev.c:6712 net/core/dev.c:6822)
<snip>
read to 0xffff8881164168b0 of 4 bytes by task 1 on cpu 2:
netpoll_send_skb (net/core/netpoll.c:319 net/core/netpoll.c:345 net/core/netpoll.c:393)
netpoll_send_udp (net/core/netpoll.c:?)
<snip>
value changed: 0x0000000a -> 0xffffffff
This happens because netpoll_owner_active() needs to check if the
current CPU is the owner of the lock, touching napi->poll_owner
non atomically. The ->poll_owner field contains the current CPU holding
the lock.
Use an atomic read to check if the poll owner is the current CPU.
📍 영향받는 시스템
Linux 커널 (주로 5.10 이상의 일부 버전, 특히 netpoll을 사용하는 네트워크 드라이버 활성 환경)
⚔️ 공격 벡터
로컬 공격자가 race condition을 악용하여 메모리 정보 유출 또는 커널 panic 유발 가능
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업그레이드하여 atomic read 기반의 패치 적용 (CVE-2024-41005 해결된 버전 이상)
🔧 검증 코드
커널 버전과 CONFIG 파일에서 netpoll 설정 여부를 확인하고, 취약점이 패치된 최신 커널 버전 이상으로 업데이트되었는지 확인합니다.
uname -r && grep -i 'netpoll' /boot/config-$(uname -r) 2>/dev/null | head -1