🇰🇷 한글 설명
Linux 커널의 net: wwan: t7xx 드라이버 RX 경로에서 skb->frags 배열의 크기 제한을 확인하지 않아 발생하는 버퍼 오버플로우 취약점입니다. 모뎀 펌웨어가 과도한 프래그먼트를 포함한 패킷을 전송할 경우 인접 메모리가 손상되어 커널 충돌이나 정의되지 않은 동작이 발생할 수 있습니다.
💡 쉬운 설명
데이터를 받아들이는 과정에서 저장 공간의 한계를 확인하지 않아 발생하는 오류입니다. 나쁜 의도를 가진 펌웨어가 너무 많은 데이터를 한꺼번에 보내면 컴퓨터의 핵심 시스템이 망가질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: wwan: t7xx: fix potential skb->frags overflow in RX path
When receiving data in the DPMAIF RX path,
the t7xx_dpmaif_set_frag_to_skb() function adds
page fragments to an skb without checking if the number of
fragments has exceeded MAX_SKB_FRAGS. This could lead to a buffer overflow
in skb_shinfo(skb)->frags[] array, corrupting adjacent memory and
potentially causing kernel crashes or other undefined behavior.
This issue was identified through static code analysis by comparing with a
similar vulnerability fixed in the mt76 driver commit b102f0c522cf ("mt76:
fix array overflow on receiving too many fragments for a packet").
The vulnerability could be triggered if the modem firmware sends packets
with excessive fragments. While under normal protocol conditions (MTU 3080
bytes, BAT buffer 3584 bytes),
a single packet should not require additional
fragments, the kernel should not blindly trust firmware behavior.
Malicious, buggy, or compromised firmware could potentially craft packets
with more fragments than the kernel expects.
Fix this by adding a bounds check before calling skb_add_rx_frag() to
ensure nr_frags does not exceed MAX_SKB_FRAGS.
The check must be performed before unmapping to avoid a page leak
and double DMA unmap during device teardown.
📍 영향받는 시스템
Linux kernel (net: wwan: t7xx driver)
⚔️ 공격 벡터
악성 또는 버그가 있는 모뎀 펌웨어가 MAX_SKB_FRAGS를 초과하는 프래그먼트를 가진 패킷을 전송
🛡️ 대응 방법
skb_add_rx_frag() 호출 전 nr_frags가 MAX_SKB_FRAGS를 초과하는지 확인하는 경계 검사 로직 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.