🇰🇷 한글 설명
Linux 커널의 vmxnet3 드라이버에서 XDP 처리 시 패킷 크기 계산 오류가 발생하여, 실제 패킷 크기보다 더 큰 패킷이 전송될 수 있는 취약점입니다. 이 과정에서 초기화되지 않은 커널 메모리 데이터가 패킷의 남은 공간에 포함되어 외부로 유출될 위험이 있습니다.
💡 쉬운 설명
네트워크 카드가 데이터를 보낼 때 실제 내용보다 더 큰 가짜 주머니를 만들어 보내는 버그입니다. 이 과정에서 컴퓨터 내부의 비밀 정보가 실수로 함께 섞여 나갈 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
vmxnet3: Fix malformed packet sizing in vmxnet3_process_xdp
vmxnet3 driver's XDP handling is buggy for packet sizes using ring0 (that
is, packet sizes between 128 - 3k bytes).
We noticed MTU-related connectivity issues with Cilium's service load-
balancing in case of vmxnet3 as NIC underneath. A simple curl to a HTTP
backend service where the XDP LB was doing IPIP encap led to overly large
packet sizes but only for *some* of the packets (e.g. HTTP GET request)
while others (e.g. the prior TCP 3WHS) looked completely fine on the wire.
In fact, the pcap recording on the backend node actually revealed that the
node with the XDP LB was leaking uninitialized kernel data onto the wire
for the affected packets, for example, while the packets should have been
152 bytes their actual size was 1482 bytes, so the remainder after 152 bytes
was padded with whatever other data was in that page at the time (e.g. we
saw user/payload data from prior processed packets).
We only noticed this through an MTU issue, e.g. when the XDP LB node and
the backend node both had the same MTU (e.g. 1500) then the curl request
got dropped on the backend node's NIC given the packet was too large even
though the IPIP-encapped packet normally would never even come close to
the MTU limit. Lowering the MTU on the XDP LB (e.g. 1480) allowed to let
the curl request succeed (which also indicates that the kernel ignored the
padding, and thus the issue wasn't very user-visible).
Commit e127ce7699c1 ("vmxnet3: Fix missing reserved tailroom") was too eager
to also switch xdp_prepare_buff() from rcd->len to rbi->len. It really needs
to stick to rcd->len which is the actual packet length from the descriptor.
The latter we also feed into vmxnet3_process_xdp_small(), by the way, and
it indicates the correct length needed to initialize the xdp->{data,data_end}
parts. For e127ce7699c1 ("vmxnet3: Fix missing reserved tailroom") the
relevant part was adapting xdp_init_buff() to address the warning given the
xdp_data_hard_end() depends on xdp->frame_sz. With that fixed, traffic on
the wire looks good again.
📍 영향받는 시스템
vmxnet3 드라이버를 사용하는 Linux 커널 (ring0 패킷 크기 128-3k 바이트 처리 시)
⚔️ 공격 벡터
특정 조건(MTU 설정 및 XDP 로드밸런싱 사용 등) 하에서 조작된 패킷을 통해 커널 메모리 정보 유출 유도
🛡️ 대응 방법
커널 패치(Commit e127ce7699c1 관련 수정 사항 포함)를 적용하여 vmxnet3 드라이버 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.