🇰🇷 한글 설명
Linux 커널의 cfg80211 구성 요소에서 PMSR 세션을 소유한 netlink 소켓이 닫힐 때와 인터페이스가 동시에 해제될 경우 데드락(Deadlock)이 발생할 수 있는 취약점입니다. 기존의 work_struct 방식이 wiphy_lock을 획득하려 시도하면서 이미 해당 락을 보유한 프로세스와 충돌하여 시스템이 멈추는 현상이 발생합니다.
💡 쉬운 설명
무선 랜카드의 설정 정보가 삭제되는 과정에서 두 가지 작업이 서로 상대방의 작업이 끝나기를 기다리며 무한히 대기하는 상태에 빠지는 문제입니다. 이로 인해 시스템이 응답하지 않거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: cfg80211: convert pmsr_free_wk to wiphy_work to fix deadlock
When a netlink socket that owns a PMSR session is closed,
cfg80211_release_pmsr() clears the request's nl_portid and queues
pmsr_free_wk to call cfg80211_pmsr_process_abort() asynchronously.
If the interface tears down concurrently, cfg80211_pmsr_wdev_down()
is called under wiphy_lock and calls cancel_work_sync(&pmsr_free_wk)
to wait for any running work. The work function acquires wiphy_lock
via guard(wiphy) before calling process_abort.
This is a deadlock: wdev_down holds wiphy_lock and blocks inside
cancel_work_sync(); pmsr_free_wk blocks trying to acquire that same
wiphy_lock. Neither thread can proceed.
The same deadlock is reachable from cfg80211_leave_locked(), which
calls cfg80211_pmsr_wdev_down() for all interface types under
wiphy_lock.
Fix this by converting pmsr_free_wk from a plain work_struct to a
wiphy_work. The wiphy_work dispatcher holds wiphy_lock when running
work items, so the explicit guard(wiphy) in the work function is no
longer needed. wiphy_work_cancel() can be called safely while holding
wiphy_lock - since wiphy_lock prevents the work from running
concurrently, wiphy_work_cancel() never blocks, eliminating the
deadlock.
Remove the cancel_work_sync() for pmsr_free_wk from the
NETDEV_GOING_DOWN handler. cfg80211_leave(), called unconditionally
just before it, already cancels any pending work under wiphy_lock
via wiphy_work_cancel() inside cfg80211_pmsr_wdev_down().
📍 영향받는 시스템
Linux kernel (cfg80211 module 사용 환경)
⚔️ 공격 벡터
로컬 사용자가 특정 netlink 소켓을 조작하여 PMSR 세션을 종료함과 동시에 네트워크 인터페이스를 해제하여 데드락 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 pmsr_free_wk를 wiphy_work로 전환 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux