🇰🇷 한글 설명
Linux 커널의 mlx5e 드라이버에서 AF_XDP 사용 시 MPWQE 재충전 재시도 중 이미 해제된 XSK 버퍼를 다시 해제하는 문제가 수정되었습니다. 할당 실패 후 재시도 시 bitmap을 올바르게 설정하여 잘못된 포인터를 통한 중복 해제를 방지합니다.
💡 쉬운 설명
고속 네트워크 카드가 데이터를 받는 과정에서 메모리 부족이 발생하면, 이미 반환된 메모리를 다시 반환하려 하는 오류가 있었습니다. 이로 인해 시스템이 불안정해질 수 있었고 이를 수정했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Prevent stale XSK buffer release on MPWQE refill retry
With AF_XDP on a striding RQ, mlx5e defers releasing XSK buffers until
an MPWQE is refilled. If XSK allocation then returns -ENOMEM,
actual_wq_head is not advanced and a later NAPI poll retries the same
WQE.
mlx5e_free_rx_mpwqe() leaves each released slot marked as releasable. On
retry it can therefore call xsk_buff_free() again through stale pointers
after the frames have returned to the XSK pool and been reallocated.
Set all skip_release_bitmap bits in the common error path of
mlx5e_xsk_alloc_rx_mpwqe(). This matches mlx5e_alloc_rx_mpwqe(). A
successful allocation already clears the bitmap after replacing every
buffer, so retries become idempotent without changing the success path.
Fault injection forced three consecutive failures for one selected MPWQE.
Both an early allocation failure and a partial 8-of-16-buffer unwind
released the original 16 XSK buffers only once. Each error left a full
bitmap, the following NAPI retry skipped the release, and a later
successful allocation cleared it. A 20-second AF_XDP zero-copy pressure
run exercised 1,575,262 buffer allocation failures without invalid
descriptors, WQE errors, or kernel warnings.
📍 영향받는 시스템
Linux 커널 mlx5e(NVIDIA/Mellanox ConnectX 네트워크 드라이버) 및 AF_XDP를 사용하는 시스템, 수정 커널 버전은 확인 필요
⚔️ 공격 벡터
공개된 정보상 원격 악용 경로는 명시되어 있지 않으며, 메모리 부족 상황에서 발생하는 use-after-free/이중 해제 계열의 결함으로 로컬 또는 네트워크 트래픽 부하를 통한 서비스 거부 또는 메모리 손상 가능성이 있음
🛡️ 대응 방법
배포판 벤더가 제공하는 수정된 Linux 커널 업데이트를 적용하고 재부팅합니다.
🔧 검증 코드
커널 버전을 벤더 보안 권고의 패치 빌드 번호와 비교하고, 해당 수정이 포함된 빌드인지 확인하며 결과가 없으면 벤더 공지를 직접 확인해야 합니다.
uname -r && grep -l mlx5e_xsk_alloc_rx_mpwqe /boot/System.map-$(uname -r) 2>/dev/null; modinfo mlx5_core 2>/dev/null | grep -E '^version'