🇰🇷 한글 설명
Linux 커널의 lan966x 이더넷 드라이버에서 MTU 변경 중 RX 리소스 재할당이 실패하면, 페이지 순서(page_order)와 최대 MTU 값이 복원되지 않아 이전 페이지와 새 페이지 지오메트리가 불일치하는 문제가 있습니다. 또한 실패 시 포트별 XDP RXQ 메모리 모델 등록이 복구되지 않아 XDP 경로에서 잘못된 프레임 크기가 사용될 수 있습니다. 이 문제는 커널 패치로 RX 상태 복원 로직을 보강하여 해결되었습니다.
💡 쉬운 설명
네트워크 장치의 설정 변경이 중간에 실패했을 때 일부 설정이 원래대로 돌아가지 않아 내부 상태가 어긋나는 문제입니다. 이로 인해 패킷 처리 과정에서 잘못된 크기 정보가 사용될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: lan966x: restore RX state on reload failure
lan966x_fdma_reload() backs up rx->page_pool and rx->fdma before
reallocating the RX resources for the new MTU. If the allocation fails,
the restore path puts these fields back before restarting RX.
However, the reload path also updates rx->page_order and rx->max_mtu
before calling lan966x_fdma_rx_alloc(). These fields are not restored on
failure, so RX can be restarted with the old pages, old FDMA state and
old page pool, but with the page geometry from the failed new MTU.
This can make the XDP path advertise a frame size derived from the new
page_order while the actual RX pages still come from the old allocation.
For example, after a failed reload to a jumbo MTU, xdp_init_buff() may be
called with a frame size larger than the restored RX pages.
lan966x_fdma_rx_alloc_page_pool() also registers the newly allocated page
pool with each port's XDP RXQ before fdma_alloc_coherent() is called. If
fdma_alloc_coherent() fails, the new page pool is destroyed, but the
rollback path does not restore the per-port XDP RXQ mem model
registration either.
Save and restore rx->page_order and rx->max_mtu, and restore the old page
pool registration for each port's XDP RXQ before RX is started again.
This keeps the restored RX state consistent after a failed reload.
📍 영향받는 시스템
lan966x 이더넷 드라이버를 사용하는 Linux 커널 (패치 이전 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 MTU 변경을 유발해 재할당 실패 상황을 만들 경우 잘못된 프레임 크기로 인한 메모리 관련 이상 동작이 발생할 가능성이 있음 (CVSS 점수 미부여, 실제 악용 사례 미확인)
🛡️ 대응 방법
최신 안정 커널 버전 또는 해당 커밋이 포함된 배포판 커널로 업데이트
🔧 검증 코드
커널 버전이 패치 적용된 배포판의 최신 버전인지 확인하고, lan966x 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r && (lsmod | grep -i lan966x || echo 'lan966x 모듈 미로드')