🇰🇷 한글 설명
Linux 커널의 ip_tunnel 구성 요소에서 options_len 변수가 참조되기 전에 초기화되지 않아 발생하는 취약점입니다. 특정 네트워크 설정을 통해 Geneve 옵션을 처리할 때 메모리 버퍼 오버플로우가 발생하며, 이는 커널 패닉(Kernel Panic)을 유발할 수 있습니다.
💡 쉬운 설명
네트워크 설정을 조작하여 컴퓨터의 핵심 시스템인 커널에 오류를 일으켜 시스템을 강제로 멈추게 할 수 있는 문제입니다. 데이터가 들어갈 공간의 크기를 제대로 계산하지 못해 발생하는 메모리 오류입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: ip_tunnel: initialize `options_len` before referencing options
The following command triggers a kernel panic:
ip link add d0 type dummy; ip link set d0 up
ip route add 10.30.0.0/16 \
encap ip id 300 geneve_opts 4660:66:11223344 dev d0
memcpy: detected buffer overflow: 4 byte write of buffer size 0
kernel BUG at lib/string_helpers.c:1044!
...
ip_tun_parse_opts.part.0.cold+0x10/0x10
ip_tun_build_state+0x116/0x2a0
On kernels built with GCC 15+ and `CONFIG_FORTIFY_SOURCE`, the fortified
`memcpy()` got 0 sized destination with request of 4 bytes length:
static int ip_tun_parse_opts_geneve(...)
{
...
attr = tb[LWTUNNEL_IP_OPT_GENEVE_DATA];
data_len = nla_len(attr); /* == 4 */
struct geneve_opt *opt = ip_tunnel_info_opts(info) + opts_len;
memcpy(opt->opt_data, nla_data(attr), data_len);
/* ^^^^^^^^^^^^^ 0 since options_len is assigned afterwards */
Fixed by initializing the counter before the options are referenced.
Matching what `tunnel_key_opts_set()` already does.
📍 영향받는 시스템
Linux Kernel (Geneve 옵션을 사용하는 ip_tunnel 모듈 포함 버전)
⚔️ 공격 벡터
조작된 Geneve 옵션을 포함한 IP 라우팅 경로를 생성하여 커널의 메모리 오버플로우 유도
🛡️ 대응 방법
ip_tunnel 관련 패치가 적용된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 보안 패치 버전 이후인지 확인
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux