🇰🇷 한글 설명
Linux 커널의 mlx5e 드라이버에서 AF_XDP 소켓 RX 링이 가득 차 XDP 리디렉션이 실패할 때, 레거시 순환 RQ의 배치 리필 재시도 중 이미 해제된 XSK 버퍼 포인터를 다시 해제하여 동일한 UMEM 프레임이 두 번 게시되는 문제입니다. 해제 직후 WQE를 released로 표시하여 재시도 시 오래된 포인터를 해제하지 않도록 수정되었습니다.
💡 쉬운 설명
네트워크 카드가 데이터를 받을 때 쓰는 메모리 조각이 잘못 두 번 사용되어 데이터가 꼬이거나 누락될 수 있습니다. 이 문제는 커널 경고 없이 조용히 발생하므로 발견이 어렵습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Prevent stale XSK buffer release on refill retry
When an XDP redirect to an AF_XDP socket fails because its RX ring is
full, the XSK core frees the buffer. During the subsequent batched refill
of a legacy cyclic RQ, mlx5e also releases the WQE's XSK buffer before
allocating a replacement. If that refill succeeds only partially, a WQE
left without a replacement retains its old buffer pointer.
The buffer can meanwhile be allocated to another WQE. A later refill
retry can then free the live buffer through the stale pointer and publish
the same UMEM frame twice.
Mark the WQE as released immediately after the driver-side free. The flag
is already cleared when a replacement buffer is assigned, so refill
retries no longer release stale pointers.
The failure is silent and produces no kernel warning or splat. A
standalone legacy cyclic-RQ zero-copy libxsk reproducer, using 64-byte UDP
traffic offered at 12 Mpps, detected it: stock stopped after 2,854,914
packets in 4.094 seconds, with 4,542 xdp_rx_ring_full events and 64
ownership/double-publication errors. With this change it processed
356,904,225 packets in 30 seconds despite 571,405 xdp_rx_ring_full events,
with no ownership or data errors.
📍 영향받는 시스템
mlx5e(Mellanox ConnectX) 드라이버를 사용하고 AF_XDP 제로카피 레거시 순환 RQ를 쓰는 수정 전 Linux 커널
⚔️ 공격 벡터
네트워크 공격자가 높은 패킷 속도로 트래픽을 보내 RX 링을 가득 채워 리필 재시도 경로를 유발하면, 중복 게시된 UMEM 프레임을 통해 데이터 무결성을 해치거나 불안정성을 유발할 수 있습니다.
🛡️ 대응 방법
패치가 포함된 최신 Linux 커널로 업데이트하고 재부팅하십시오.
🔧 검증 코드
커널 버전을 확인하고 해당 배포판의 보안 공지에서 이 CVE의 수정된 커널 버전과 비교하십시오. 수정 버전 이상이면 패치가 적용된 것입니다.
uname -r && (modinfo mlx5_core 2>/dev/null | grep -E '^(version|srcversion)')