🇰🇷 한글 설명
Linux 커널의 rtl8723bs 드라이버 내 rtw_surveydone_event_callback() 함수에서 데드락(교착 상태)이 발생할 수 있는 취약점입니다. 특정 상황에서 스핀락을 보유한 상태로 타이머 중단을 기다리면서, 타이머 핸들러가 동일한 락을 요청하여 시스템이 무한 대기에 빠지게 됩니다.
💡 쉬운 설명
컴퓨터의 무선 랜 드라이버가 특정 작업을 처리하는 과정에서 서로의 작업이 끝나기만을 기다리며 멈춰버리는 현상입니다. 이로 인해 시스템이 응답하지 않거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drivers: staging: rtl8723bs: Fix deadlock in rtw_surveydone_event_callback()
There is a deadlock in rtw_surveydone_event_callback(),
which is shown below:
(Thread 1) | (Thread 2)
| _set_timer()
rtw_surveydone_event_callback()| mod_timer()
spin_lock_bh() //(1) | (wait a time)
... | rtw_scan_timeout_handler()
del_timer_sync() | spin_lock_bh() //(2)
(wait timer to stop) | ...
We hold pmlmepriv->lock in position (1) of thread 1 and use
del_timer_sync() to wait timer to stop, but timer handler
also need pmlmepriv->lock in position (2) of thread 2.
As a result, rtw_surveydone_event_callback() will block forever.
This patch extracts del_timer_sync() from the protection of
spin_lock_bh(), which could let timer handler to obtain
the needed lock. What`s more, we change spin_lock_bh() in
rtw_scan_timeout_handler() to spin_lock_irq(). Otherwise,
spin_lock_bh() will also cause deadlock() in timer handler.
📍 영향받는 시스템
Linux kernel (drivers/staging/rtl8723bs 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 네트워크 스캔 또는 이벤트 발생을 유도하여 시스템을 멈추게 할 수 있음
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하거나 해당 드라이버의 수정된 패치를 적용해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.