🇰🇷 한글 설명
Linux 커널의 ath12k 무선 드라이버에서 관리 프레임 플러시 시 데드락이 발생하는 취약점입니다. 관리 전송 작업이 wiphy 워크로 변경되면서, 플러시 과정이 wiphy 락을 잡은 상태에서 대기하여 전송 작업이 실행되지 못합니다. 이로 인해 무선 인증/연결 과정이 멈추거나 서비스 장애가 발생할 수 있습니다.
💡 쉬운 설명
무선랜 드라이버 내부에서 두 작업이 서로 상대방을 기다리며 멈추는 문제입니다. 이로 인해 Wi-Fi 연결이 끊기거나 연결 시도가 실패할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath12k: fix dead lock while flushing management frames
Commit [1] converted the management transmission work item into a
wiphy work. Since a wiphy work can only run under wiphy lock
protection, a race condition happens in below scenario:
1. a management frame is queued for transmission.
2. ath12k_mac_op_flush() gets called to flush pending frames associated
with the hardware (i.e, vif being NULL). Then in ath12k_mac_flush()
the process waits for the transmission done.
3. Since wiphy lock has been taken by the flush process, the transmission
work item has no chance to run, hence the dead lock.
>From user view, this dead lock results in below issue:
wlp8s0: authenticate with xxxxxx (local address=xxxxxx)
wlp8s0: send auth to xxxxxx (try 1/3)
wlp8s0: authenticate with xxxxxx (local address=xxxxxx)
wlp8s0: send auth to xxxxxx (try 1/3)
wlp8s0: authenticated
wlp8s0: associate with xxxxxx (try 1/3)
wlp8s0: aborting association with xxxxxx by local choice (Reason: 3=DEAUTH_LEAVING)
ath12k_pci 0000:08:00.0: failed to flush mgmt transmit queue, mgmt pkts pending 1
The dead lock can be avoided by invoking wiphy_work_flush() to proactively
run the queued work item. Note actually it is already present in
ath12k_mac_op_flush(), however it does not protect the case where vif
being NULL. Hence move it ahead to cover this case as well.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3
📍 영향받는 시스템
Linux 커널 ath12k 무선 드라이버를 사용하는 시스템 (Qualcomm WCN7850 등 Wi-Fi 7 칩셋 탑재 장비, 수정 커밋 이전 커널)
⚔️ 공격 벡터
로컬 또는 인접 무선 환경에서 관리 프레임 전송 및 연결 해제 상황을 유발해 드라이버 데드락을 일으키는 방식으로 추정되며, 주로 서비스 거부 성격입니다.
🛡️ 대응 방법
업스트림 Linux 커널의 해당 수정 패치가 포함된 최신 커널 버전으로 업데이트하십시오.
🔧 검증 코드
커널 버전이 수정 패치 포함 버전보다 낮고 ath12k 드라이버가 사용 중이며 dmesg에 'failed to flush mgmt' 메시지가 있으면 영향받는 것이며, 메시지가 없거나 최신 커널이면 영향이 적습니다.
uname -r && (dmesg 2>/dev/null | grep -i 'failed to flush mgmt' ; lspci -k 2>/dev/null | grep -A3 -i 'network')