🇰🇷 한글 설명
Linux 커널의 ath12k 드라이버에서 드라이버 언바인딩 시 NULL 포인터 역참조가 발생하는 취약점입니다. 초기화 과정이 완료되지 않은 상태에서 해시 테이블을 파괴하려고 시도할 때 발생하며, 특히 MSI 주소 지정 초기화에 실패하는 가상 머신 환경에서 재현됩니다.
💡 쉬운 설명
무선 랜 드라이버가 꺼질 때, 아직 만들어지지도 않은 데이터 저장 공간을 삭제하려고 시도하여 시스템이 충돌하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath12k: fix NULL pointer dereference in rhash table destroy
When unbinding the ath12k driver, kernel NULL pointer dereferences
occur in irq_work_sync() called from rhashtable_destroy().
Two hash tables are affected:
1. ath12k_link_sta hash table in ath12k_base
2. ath12k_dp_link_peer hash table in ath12k_dp
The issue happens because the destroy functions are called unconditionally
in cleanup paths, but the hash tables are only initialized late in their
respective init functions. If the device was never fully started or if the
init functions failed before initializing the hash tables, the pointers
will be NULL. The issues are always reproducible from a VM because the MSI
addressing initialization is failing.
Call trace for ath12k_link_sta_rhash_tbl_destroy:
RIP: irq_work_sync+0x1e/0x70
rhashtable_destroy+0x12/0x60
ath12k_link_sta_rhash_tbl_destroy+0x19/0x40 [ath12k]
ath12k_core_stop+0xe/0x80 [ath12k]
ath12k_core_hw_group_cleanup+0x6b/0xb0 [ath12k]
ath12k_pci_remove+0x60/0x110 [ath12k]
Call trace for ath12k_dp_link_peer_rhash_tbl_destroy:
RIP: irq_work_sync+0x1e/0x70
rhashtable_destroy+0x12/0x60
ath12k_dp_link_peer_rhash_tbl_destroy+0x29/0x50 [ath12k]
ath12k_dp_cmn_device_deinit+0x21/0x140 [ath12k]
ath12k_core_hw_group_cleanup+0x6b/0xb0 [ath12k]
ath12k_pci_remove+0x60/0x110 [ath12k]
Fix this by adding NULL checks before calling rhashtable_destroy() in
both destroy functions.
The NULL check approach was chosen because the rhashtable pointer
serves as the initialization state indicator. The init can fail at
various points, leaving some components uninitialized. Checking the
pointer directly is simpler than adding separate state flags that
would need synchronization.
📍 영향받는 시스템
Linux kernel (ath12k driver)
⚔️ 공격 벡터
로컬 환경에서 드라이버 언바인딩 또는 초기화 실패 유도 (가상 머신 환경 포함)
🛡️ 대응 방법
rhashtable_destroy() 호출 전 NULL 체크 로직이 포함된 최신 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인하십시오.
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux