🇰🇷 한글 설명
Linux 커널의 XSK(AF_XDP) 구성 요소에서 사용자 공간이 제공하는 xdp_desc 검증 과정에 취약점이 발견되었습니다. 특정 조건에서 정수 오버플로 및 언더플로가 발생하여 잘못된 프레임이 전송 대기열에 추가되거나 정의되지 않은 동작(UB)을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 네트워크 처리 과정에서 데이터의 크기를 계산할 때 숫자가 너무 커지거나 작아지는 오류가 발생할 수 있는 문제입니다. 공격자가 이 오류를 이용해 시스템을 오작동하게 만들거나 비정상적인 데이터를 보낼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xsk: Harden userspace-supplied xdp_desc validation
Turned out certain clearly invalid values passed in xdp_desc from
userspace can pass xp_{,un}aligned_validate_desc() and then lead
to UBs or just invalid frames to be queued for xmit.
desc->len close to ``U32_MAX`` with a non-zero pool->tx_metadata_len
can cause positive integer overflow and wraparound, the same way low
enough desc->addr with a non-zero pool->tx_metadata_len can cause
negative integer overflow. Both scenarios can then pass the
validation successfully.
This doesn't happen with valid XSk applications, but can be used
to perform attacks.
Always promote desc->len to ``u64`` first to exclude positive
overflows of it. Use explicit check_{add,sub}_overflow() when
validating desc->addr (which is ``u64`` already).
bloat-o-meter reports a little growth of the code size:
add/remove: 0/0 grow/shrink: 2/1 up/down: 60/-16 (44)
Function old new delta
xskq_cons_peek_desc 299 330 +31
xsk_tx_peek_release_desc_batch 973 1002 +29
xsk_generic_xmit 3148 3132 -16
but hopefully this doesn't hurt the performance much.
📍 영향받는 시스템
XSK(AF_XDP) 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
사용자 공간에서 조작된 잘못된 xdp_desc 값을 커널에 전달하여 정수 오버플로 유발
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.