🇰🇷 한글 설명
Linux 커널의 ath9k 무선 드라이버(hif_usb)에서 ath9k_hif_usb_rx_stream() 함수가 실패할 때 이미 할당된 skb 버퍼가 정리되지 않아 메모리 누수가 발생하는 문제입니다. 잘못된 패킷 길이나 태그를 받으면 관련 skb가 해제되지 않으며, 이 패치는 실패 시 skb_pool의 버퍼를 모두 해제하고 remain_skb 포인터를 정리합니다.
💡 쉬운 설명
USB 무선 랜카드 드라이버가 잘못된 데이터를 받았을 때 임시 메모리를 반환하지 않아 시스템 메모리가 조금씩 새어 나가는 문제입니다. 장시간 사용 시 메모리 부족이나 성능 저하로 이어질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath9k: hif_usb: clean up skbs if ath9k_hif_usb_rx_stream() fails
Syzkaller detected a memory leak of skbs in ath9k_hif_usb_rx_stream().
While processing skbs in ath9k_hif_usb_rx_stream(), the already allocated
skbs in skb_pool are not freed if ath9k_hif_usb_rx_stream() fails. If we
have an incorrect pkt_len or pkt_tag, the input skb is considered invalid
and dropped. All the associated packets already in skb_pool should be
dropped and freed. Added a comment describing this issue.
The patch also makes remain_skb NULL after being processed so that it
cannot be referenced after potential free. The initialization of hif_dev
fields which are associated with remain_skb (rx_remain_len,
rx_transfer_len and rx_pad_len) is moved after a new remain_skb is
allocated.
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
📍 영향받는 시스템
ath9k 드라이버를 사용하는 USB 무선랜 어댑터가 연결된 Linux 커널 (수정 패치 적용 이전 버전)
⚔️ 공격 벡터
공격자가 조작된 패킷을 USB 무선 장치를 통해 전송하여 잘못된 pkt_len 또는 pkt_tag를 유발하면 메모리 누수가 반복적으로 발생할 수 있습니다.
🛡️ 대응 방법
사용 중인 배포판의 최신 커널 업데이트를 설치하여 해당 패치가 포함된 버전으로 재부팅합니다.
🔧 검증 코드
출력된 커널 버전이 배포판의 패치 적용 버전 이상인지 확인하고, ath9k 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r && (lsmod | grep -E 'ath9k_htc|ath9k' 2>/dev/null || echo 'ath9k 모듈 미로드')