🇰🇷 한글 설명
Linux 커널의 mac80211 스택에서 ieee80211_monitor_select_queue() 함수가 skb->len을 사용하여 데이터 길이를 검증할 때 발생하는 slab-out-of-bounds read 취약점입니다. AF_PACKET을 통해 비선형(non-linear) 패킷이 전송될 경우, 커널이 할당된 선형 헤더 버퍼 범위를 벗어나 메모리를 읽게 되어 시스템 오류를 유발할 수 있습니다.
💡 쉬운 설명
데이터가 담긴 상자의 전체 크기만 확인하고 실제 데이터가 들어있는 칸의 크기를 확인하지 않아, 상자 밖의 영역을 읽으려다 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: fix slab-out-of-bounds read in ieee80211_monitor_select_queue()
ieee80211_monitor_select_queue() validates the skb length using skb->len
before dereferencing pointers into skb->data to access the 802.11 header.
However, skb->len includes data in both the linear head buffer and
non-linear fragments/pages. When AF_PACKET sends a packet large enough to
become non-linear, the 802.11 header at skb->data + len_rthdr may extend
past the linear head buffer even though skb->len appears sufficient.
This leads to a slab-out-of-bounds read when accessing hdr->frame_control,
as the kernel reads beyond the allocated skb head buffer:
BUG: KASAN: slab-out-of-bounds in ieee80211_monitor_select_queue+0x1ed/0x220
syzbot has hit the same issues.
Fix this by checking skb_headlen(skb) (which gives the length of the
linear data region) instead of skb->len before dereferencing skb->data
pointers. This ensures the required bytes are actually present in the
linear portion of the skb.
Apply the same fix to ieee80211_validate_radiotap_len() which has the
same class of bug: it uses skb->len to validate accesses to skb->data,
and to the corresponding checks in ieee80211_monitor_start_xmit(): for
drivers advertising NETIF_F_SG the skb is not linearized before
ndo_start_xmit, so the 802.11 header can be read past the linear
buffer there as well.
📍 영향받는 시스템
Linux kernel (mac80211 subsystem using AF_PACKET and NETIF_F_SG)
⚔️ 공격 벡터
AF_PACKET을 통해 비선형(non-linear) 구조를 가진 대형 802.11 패킷을 전송하여 메모리 경계를 넘어서는 읽기 유도
🛡️ 대응 방법
skb->len 대신 skb_headlen(skb)를 사용하여 선형 데이터 영역의 길이를 검증하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.