🇰🇷 한글 설명
Linux 커널의 qede 드라이버에서 메모리 압박 시 skb 할당 실패에 대한 NULL 체크가 누락되어 발생하는 off-by-one 취약점입니다. 이로 인해 BD 링의 동기화가 깨지며 DMA 페이지 참조 카운트 및 SLUB freelist가 손상될 수 있습니다.
💡 쉬운 설명
네트워크 카드가 데이터를 처리하는 과정에서 메모리가 부족할 때 발생하는 오류입니다. 이 오류를 이용하면 시스템의 메모리 관리 체계를 망가뜨려 시스템을 중단시키거나 보안을 위협할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
qede: fix off-by-one in BD ring consumption on build_skb failure
qede_rx_build_skb() and qede_tpa_rx_build_skb() do not check for a
NULL return from qede_build_skb(). When it returns NULL under memory
pressure, the functions still consume a BD from the ring before
returning NULL. The callers then recycle additional BDs, resulting in
one extra BD being consumed (off-by-one). This desynchronizes the BD
ring, which can corrupt DMA page reference counts and lead to SLUB
freelist corruption.
Commit 4e910dbe3650 ("qede: confirm skb is allocated before using")
added a NULL check inside qede_build_skb() to prevent a NULL pointer
dereference, but did not address the missing NULL checks in the
callers, making this off-by-one reachable.
Fix this by adding NULL checks for the return value of
qede_build_skb() in both qede_rx_build_skb() and
qede_tpa_rx_build_skb(), returning NULL immediately before any BD ring
manipulation.
📍 영향받는 시스템
Linux kernel (qede driver 사용 시스템)
⚔️ 공격 벡터
메모리 압박 상황을 유도하여 네트워크 패킷 수신 시 BD 링의 불일치를 유발
🛡️ 대응 방법
커널 패치를 적용하여 qede_rx_build_skb() 및 qede_tpa_rx_build_skb() 함수에 NULL 체크 로직 추가
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.