🇰🇷 한글 설명
Linux 커널의 ti icssg-prueth 드라이버에서 XDP_DROP 경로의 메모리 누수 취약점입니다. Non-zero-copy 모드에서 패킷을 drop할 때 페이지가 페이지 풀로 반환되지 않아 메모리 고갈(OOM) 상태를 초래합니다. emac_rx_packet() 함수에서 페이지 재활용을 처리하여 해결합니다.
💡 쉬운 설명
리눅스 네트워크 드라이버에서 XDP 프로그램이 패킷을 버릴 때 사용한 메모리를 제대로 반환하지 못해 메모리가 계속 줄어드는 문제입니다. 시간이 지나면서 시스템 메모리가 부족해져 정상 작동이 불가능해집니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: ti: icssg-prueth: Fix memory leak in XDP_DROP for non-zero-copy mode
Page recycling was removed from the XDP_DROP path in emac_run_xdp() to
avoid conflicts with AF_XDP zero-copy mode, which uses xsk_buff_free()
instead.
However, this causes a memory leak when running XDP programs that drop
packets in non-zero-copy mode (standard page pool mode). The pages are
never returned to the page pool, leading to OOM conditions.
Fix this by handling cleanup in the caller, emac_rx_packet().
When emac_run_xdp() returns ICSSG_XDP_CONSUMED for XDP_DROP, the
caller now recycles the page back to the page pool. The zero-copy
path, emac_rx_packet_zc() already handles cleanup correctly with
xsk_buff_free().
📍 영향받는 시스템
TI ICSSG-PRUETH 드라이버를 사용하는 Linux 커널 시스템 (임베디드 보드, PRU 기반 장치)
⚔️ 공격 벡터
로컬 권한 사용자가 XDP_DROP 동작을 트리거하는 XDP 프로그램을 실행하여 메모리 누수 유발 가능
🛡️ 대응 방법
Linux 커널 패치 적용 (emac_rx_packet() 함수의 페이지 정리 로직 추가)
🔧 검증 코드
커널 버전이 표시되고 icssg/prueth 디바이스가 /proc/net/dev에 나타나면 해당 드라이버가 로드된 상태입니다. 패치 적용 후 메모리 사용량 안정성을 모니터링하여 누수 해결 확인
uname -r | grep -E '^[0-9]+\.[0-9]+' && grep -i 'icssg\|prueth' /proc/net/dev 2>/dev/null || echo 'Device not found'