🇰🇷 한글 설명
Linux 커널의 stmmac 네트워크 드라이버에서 TSO(TCP Segmentation Offload) 기능 사용 시 DMA API 호출 과정에서 불균형한 매핑/언매핑이 발생하는 취약점입니다. 64비트 주소 체계에서 DMA 쿠키 값이 실제 할당된 값과 일치하지 않아 커널 Oops(시스템 충돌)를 유발할 수 있습니다.
💡 쉬운 설명
네트워크 카드가 데이터를 처리할 때 사용하는 메모리 주소 계산 방식에 오류가 있어 시스템이 갑자기 멈추거나 충돌할 수 있는 문제입니다. 특정 네트워크 설정 환경에서 데이터 전송 시 메모리 관리 규칙을 어기게 되어 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: fix TSO DMA API usage causing oops
Commit 66600fac7a98 ("net: stmmac: TSO: Fix unbalanced DMA map/unmap
for non-paged SKB data") moved the assignment of tx_skbuff_dma[]'s
members to be later in stmmac_tso_xmit().
The buf (dma cookie) and len stored in this structure are passed to
dma_unmap_single() by stmmac_tx_clean(). The DMA API requires that
the dma cookie passed to dma_unmap_single() is the same as the value
returned from dma_map_single(). However, by moving the assignment
later, this is not the case when priv->dma_cap.addr64 > 32 as "des"
is offset by proto_hdr_len.
This causes problems such as:
dwc-eth-dwmac 2490000.ethernet eth0: Tx DMA map failed
and with DMA_API_DEBUG enabled:
DMA-API: dwc-eth-dwmac 2490000.ethernet: device driver tries to +free DMA memory it has not allocated [device address=0x000000ffffcf65c0] [size=66 bytes]
Fix this by maintaining "des" as the original DMA cookie, and use
tso_des to pass the offset DMA cookie to stmmac_tso_allocator().
Full details of the crashes can be found at:
https://lore.kernel.org/all/
[email protected]/
https://lore.kernel.org/all/klkzp5yn5kq5efgtrow6wbvnc46bcqfxs65nz3qy77ujr5turc@bwwhelz2l4dw/
📍 영향받는 시스템
stmmac 드라이버를 사용하는 Linux 커널 기반 시스템 (특히 64비트 DMA 주소를 사용하는 환경)
⚔️ 공격 벡터
직접적인 원격 공격보다는 특정 네트워크 트래픽 패턴을 유도하여 커널 패닉(DoS)을 일으킬 수 있음
🛡️ 대응 방법
커널 패치(Commit 66600fac7a98 포함)를 적용하여 DMA 쿠키 관리 로직을 수정해야 함
🔧 검증 코드
현재 커널 버전과 stmmac 모듈 정보를 확인하여 해당 패치가 적용된 최신 커널인지 확인합니다.
uname -r && modinfo stmmac 2>/dev/null