🇰🇷 한글 설명
Linux 커널의 xfrm6 모듈에서 secpath의 깊이 체크 로직에 오프바이원(off-by-one) 오류가 존재하여 경계 외 쓰기(out-of-bounds write)가 발생할 수 있는 취약점입니다. 특정 IPv6 옵션이 포함된 패킷이 재주입될 때 xfrm6_input_addr() 함수에서 배열 범위를 초과하여 데이터를 기록함으로써 시스템 패닉을 유발할 수 있습니다.
💡 쉬운 설명
리눅스 운영체제의 네트워크 처리 과정에서 데이터 저장 공간의 크기를 잘못 계산하여, 허용된 범위를 넘어선 데이터를 기록하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 오류가 발생하여 서비스가 중단될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xfrm6: fix out-of-bounds write in xfrm6_input_addr() when secpath is full
The depth check in xfrm6_input_addr() is off by one:
if (1 + sp->len == XFRM_MAX_DEPTH)
goto drop;
...
sp->xvec[sp->len++] = x;
xfrm_input() can leave sp->len == XFRM_MAX_DEPTH, and the transport-mode
receive path re-enters IPv6 input via xfrm_trans_reinject() with that
secpath preserved. If the inner packet carries a destination-options HAO
option or a type-2 routing header, xfrm6_input_addr() is called with
sp->len == XFRM_MAX_DEPTH; the check (1 + 6 == 6) is false, so
sp->xvec[sp->len++] writes one slot past the 6-element xvec[]. The write
stays within the sec_path allocation (invisible to KASAN); UBSAN_BOUNDS
flags it and panics under panic_on_warn.
Use "sp->len >= XFRM_MAX_DEPTH", matching xfrm_input(). This also
restores one chain level the old check rejected at sp->len == 5.
UBSAN: array-index-out-of-bounds in net/ipv6/xfrm6_input.c:309:10
index 6 is out of range for type 'xfrm_state *[6]'
📍 영향받는 시스템
Linux kernel (xfrm6 module 관련 버전)
⚔️ 공격 벡터
특정 IPv6 옵션(destination-options HAO 또는 type-2 routing header)이 포함된 조작된 패킷을 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 xfrm6_input_addr()의 경계 검사 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.