🇰🇷 한글 설명
Linux 커널의 veth 드라이버에서 veth_poll 함수가 피어 TX 큐를 깨울 때 잘못된 인덱스를 사용하는 취약점입니다. XDP 프로그램이 설정되지 않은 상태에서 멀티 큐 환경을 사용할 경우, 특정 큐가 멈춘 후 다시 활성화되지 않아 네트워크 통신이 영구적으로 중단될 수 있습니다.
💡 쉬운 설명
가상 네트워크 장치에서 데이터를 주고받는 통로 중 하나가 꽉 찼을 때, 이를 다시 작동시켜야 하는 신호가 엉뚱한 곳으로 전달되는 문제입니다. 이로 인해 네트워크 연결이 끊기고 복구되지 않는 현상이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
veth: fix queue index used to wake the peer txq in veth_poll
veth_poll() derives the index of the peer TX queue to wake from
rq->xdp_rxq.queue_index. That field is only initialized by
xdp_rxq_info_reg() in veth_enable_xdp_range(), which runs only when an
XDP program is attached. On the plain GRO/NAPI path
(veth_napi_enable_range()) xdp_rxq_info_reg() is never called, so
queue_index stays 0 for every queue, as priv->rq is zero-allocated.
So in a multi-queue setup with GRO enabled and no XDP program attached,
every NAPI instance looks at the peer's TX queue 0. If veth_xmit() stops
peer TX queue 1 because the ptr_ring is full (NETDEV_TX_BUSY), nothing
ever wakes it again: the poller draining queue 1 wakes queue 0 instead.
veth implements no ndo_tx_timeout, so the netdev watchdog does not kick
in either, and the queue stays stopped indefinitely.
Derive the index from the position of the rq within priv->rq instead,
which is correct regardless of whether XDP was ever enabled.
Scripts to reproduce the stall are available at
https://github.com/netoptimizer/veth-backpressure-performance-testing
📍 영향받는 시스템
XDP가 활성화되지 않은 멀티 큐 설정을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
네트워크 트래픽 부하를 유도하여 특정 큐의 버퍼를 가득 채움으로써 네트워크 서비스 거부(DoS) 유발
🛡️ 대응 방법
veth_poll에서 queue_index 대신 rq의 위치를 기반으로 인덱스를 계산하도록 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인