🇰🇷 한글 설명
Linux 커널의 netfilter SIP 모듈에서 NAT 재작성 시 발생하는 정수 오버플로우 취약점입니다. SIP 메시지의 크기 변화량을 저장하는 변수가 16비트(s16)로 설정되어 있어, 대규모 메시지 처리 시 오버플로우가 발생하고 이로 인해 메모리 경계를 벗어난 읽기(Out-of-bounds Read) 및 Use-After-Free 오류가 발생할 수 있습니다.
💡 쉬운 설명
SIP라는 통신 규격을 처리할 때 데이터 크기를 계산하는 숫자가 너무 작아서 계산 오류가 발생하는 문제입니다. 이 오류를 이용하면 컴퓨터의 메모리 영역을 잘못 건드려 시스템을 멈추게 하거나 보안 문제를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_conntrack_sip: widen NAT rewrite delta to s32 in sip_help_tcp()
sip_help_tcp() stores the size change of each NAT-rewritten SIP message
in s16 diff and accumulates it in s16 tdiff, but a single message can
grow by more than S16_MAX while the packet stays under the 65535
enlarge_skb() limit: nf_nat_sip() rewrites every matching URI, and a long
Contact list expands the message by tens of kilobytes. diff then wraps,
and "datalen = datalen + diff - msglen" yields a huge unsigned datalen,
so the next iteration's ct_sip_get_header() reads past the linearized skb
tail.
Widen diff, tdiff and the seq_adjust hook to s32. Both are bounded by the
65535 byte packet limit, and the seqadj core is already s32
(nf_ct_seqadj_set() takes s32), so no previously accepted input is
rejected.
BUG: KASAN: use-after-free in ct_sip_get_header (net/netfilter/nf_conntrack_sip.c:464)
Read of size 1 at addr ffff888010800000 by task ksoftirqd/1/25
ct_sip_get_header (net/netfilter/nf_conntrack_sip.c:464)
sip_help_tcp (net/netfilter/nf_conntrack_sip.c:1694)
nf_confirm (net/netfilter/nf_conntrack_proto.c:183)
nf_hook_slow (net/netfilter/core.c:619)
ip6_output (net/ipv6/ip6_output.c:246)
ip6_forward (net/ipv6/ip6_output.c:690)
ipv6_rcv (net/ipv6/ip6_input.c:351)
__netif_receive_skb_one_core (net/core/dev.c:6212)
process_backlog (net/core/dev.c:6676)
__napi_poll (net/core/dev.c:7735)
net_rx_action (net/core/dev.c:7955)
handle_softirqs (kernel/softirq.c:622)
run_ksoftirqd (kernel/softirq.c:1076)
...
📍 영향받는 시스템
Linux Kernel (netfilter/nf_conntrack_sip 모듈 사용 버전)
⚔️ 공격 벡터
조작된 대규모 Contact 리스트를 포함한 SIP 메시지를 전송하여 커널 메모리 오버플로우 유도
🛡️ 대응 방법
SIP 메시지 크기 변화량을 처리하는 변수(diff, tdiff)를 16비트(s16)에서 32비트(s32)로 확장한 최신 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.