🇰🇷 한글 설명
Linux 커널의 stmmac 네트워크 드라이버에서 TSO(TCP Segmentation Offload) 트래픽 처리 시 TX 디스크립터 가용성 검사 로직에 오류가 발견되었습니다. 이로 인해 실제 필요한 디스크립터 수보다 적게 계산되어, DMA 엔진이 사용 중인 메모리 영역을 덮어쓰고 TX 링을 손상시킬 수 있습니다.
💡 쉬운 설명
네트워크 데이터를 전송할 때 필요한 메모리 공간을 잘못 계산하여, 이미 사용 중인 중요한 데이터를 덮어씌울 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 네트워크 통신에 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: fix TX descriptor availability check for TSO traffic
stmmac_tso_xmit() estimates the number of free TX descriptors required by
a TSO skb as:
(skb->len - proto_hdr_len) / TSO_MAX_BUFF_SIZE + 1
which assumes the payload is split into TSO_MAX_BUFF_SIZE chunks. This
underestimates the descriptors actually consumed by stmmac_tso_allocator(),
since each fragment is mapped individually and so it needs at least one
descriptor regardless of its size. Moreover, one descriptor is used for
the L2/L3/L4 headers and, when the MSS changes, one more is consumed for
the MSS context descriptor.
For a highly fragmented TSO skb the check can therefore pass even when the
ring has too few free slots. stmmac_tso_allocator() then writes past the
available descriptors, overwriting descriptors still owned by the DMA
engine, corrupting the TX ring.
Add stmmac_tso_get_num_desc() to compute the exact number of descriptors
needed for the header, the linear payload and each fragment, plus the MSS
context descriptor when required, and use it in the availability check.
📍 영향받는 시스템
Linux kernel (stmmac driver 사용 시스템)
⚔️ 공격 벡터
조작된 단편화(fragmented) TSO 패킷을 전송하여 메모리 오버라이트 유도
🛡️ 대응 방법
stmmac_tso_get_num_desc() 함수가 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 최신 패치 버전인지 확인합니다.