🇰🇷 한글 설명
Linux 커널의 ath12k Wi-Fi 드라이버에서 AP 가상 디바이스(vdev) 롤백 시 dp_link_peer에 대한 댕글링 참조가 발생하는 취약점입니다. 오류 발생 시 참조를 해제하지 않고 메모리를 해제하여, 이후 참조 시 Use-After-Free(UAF) 문제가 발생할 수 있습니다.
💡 쉬운 설명
Wi-Fi 연결을 설정하다가 오류가 발생했을 때, 시스템이 사용하던 메모리 주소를 제대로 정리하지 못하는 문제입니다. 이로 인해 나중에 시스템이 잘못된 메모리 주소를 참조하게 되어 프로그램이 충돌하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath12k: fix dp_link_peer dangling references on AP vdev rollback
ath12k_mac_vdev_create() for an AP vdev creates the bss self-peer via
ath12k_peer_create(), which finishes by calling
ath12k_dp_link_peer_assign() to publish the dp_link_peer in the
dp_hw->dp_peers[peerid_index] RCU table, in the dp_peer's
link_peers[] array, and in the per-addr rhashtable.
If a step after ath12k_peer_create() fails the function jumps to
err_peer_del, which open-codes a WMI peer_delete and waits for the
unmap / delete_resp events. The wait_for_peer_delete_done() path
relies on ath12k_dp_link_peer_unmap_event() freeing the dp_link_peer
when the unmap arrives, but err_peer_del never calls
ath12k_dp_link_peer_unassign() first. The published references in
the dp_hw RCU table, dp_peer->link_peers[] and the rhashtable are
left pointing at the dp_link_peer that unmap_event then frees,
producing dangling pointers and use-after-free on subsequent
lookups.
Replace the open-coded sequence with a call to ath12k_peer_delete(),
which already does ath12k_dp_link_peer_unassign() before sending the
WMI command. This drops the published references before the
dp_link_peer is freed, in the same order as the normal teardown path
in ath12k_mac_remove_link_interface().
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
📍 영향받는 시스템
Linux kernel (ath12k driver components)
⚔️ 공격 벡터
특정 조건에서 AP 가상 디바이스 생성 실패를 유도하여 메모리 오류를 일으키는 방식
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하여 ath12k_peer_delete() 함수가 적용되도록 조치
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인