🇰🇷 한글 설명
Linux 커널의 rtw88 WiFi 드라이버에서 USB 쓰기 작업 실패 시 메모리 누수가 발생하는 취약점입니다. USB 요청 블록(URB) 제출 실패 시 완료 콜백이 실행되지 않아 할당된 skb와 txcb 구조체가 해제되지 않고 메모리에 남게 됩니다.
💡 쉬운 설명
WiFi 장치가 연결 해제되거나 메모리가 부족할 때, 컴퓨터가 사용하던 메모리를 제대로 돌려주지 못하고 계속 쌓아두는 문제입니다. 이 현상이 반복되면 시스템의 메모리가 부족해져 컴퓨터가 느려지거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: rtw88: usb: fix memory leaks on USB write failures
When rtw_usb_write_port() fails to submit a USB Request Block (URB)
(e.g., due to device disconnect or ENOMEM), the completion callback is
never executed.
Currently, the driver ignores the return value of rtw_usb_write_port()
in rtw_usb_write_data() and rtw_usb_tx_agg_skb(). Because these
functions rely on the completion callback to free the socket buffers
(skbs) and the transaction control block (txcb), a submission failure
results in:
1. A memory leak of the allocated skb in rtw_usb_write_data().
2. A memory leak of the txcb structure and all aggregated skbs in
rtw_usb_tx_agg_skb().
Fix this by checking the return value of rtw_usb_write_port(). If it
fails, explicitly free the skb in rtw_usb_write_data(), and properly
purge the tx_ack_queue and free the txcb in rtw_usb_tx_agg_skb().
The issue was discovered in practice during device disconnect/reconnect
scenarios and memory pressure conditions. Tested by verifying normal TX
operation continues after the fix without regressions.
📍 영향받는 시스템
rtw88 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
물리적인 장치 연결 해제 또는 메모리 압박 상황을 유도하여 메모리 누수 발생 가능
🛡️ 대응 방법
rtw88 드라이버의 USB 쓰기 실패 처리 로직이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인