🇰🇷 한글 설명
Linux 커널 netfilter의 SIP 패킷 처리에서 Content-Length 헤더를 파싱할 때 64비트 시스템에서 unsigned long 값이 unsigned int로 절단되는 오버플로우 취약점입니다. 이로 인해 SIP 메시지 경계 계산이 틀어져 TCP 데이터가 두 번째 메시지로 잘못 처리되면서 메모리 손상이나 정보 유출을 유발할 수 있습니다.
💡 쉬운 설명
리눅스 시스템이 인터넷 전화(SIP) 통신의 메시지 크기를 잘못 계산하여 패킷을 오류로 처리합니다. 공격자가 특정 크기값을 보내면 시스템이 두 개의 메시지로 혼동되어 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_conntrack_sip: fix Content-Length u32 truncation in sip_help_tcp()
sip_help_tcp() parses the SIP Content-Length header with
simple_strtoul(), which returns unsigned long, but stores the result in
unsigned int clen. On 64-bit systems, values exceeding UINT_MAX are
silently truncated before computing the SIP message boundary.
For example, Content-Length 4294967328 (2^32 + 32) is truncated to 32,
causing the parser to miscalculate where the current message ends. The
loop then treats trailing data in the TCP segment as a second SIP
message and processes it through the SDP parser.
Fix this by changing clen to unsigned long to match the return type of
simple_strtoul(), and reject Content-Length values that exceed the
remaining TCP payload length.
📍 영향받는 시스템
Linux kernel 모든 버전의 64비트 시스템 (netfilter nf_conntrack_sip 모듈 포함)
⚔️ 공격 벡터
Content-Length 헤더값을 UINT_MAX(4294967295) 초과로 조작한 SIP 패킷을 전송하여 파서 혼동 유발
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업데이트하여 Content-Length 파싱을 unsigned int에서 unsigned long으로 변경한 패치 적용
🔧 검증 코드
명령어에서 'Vulnerable'이 출력되면 취약점이 존재하고, 그 외에는 패치 적용됨을 의미합니다.
grep 'unsigned int clen' /usr/src/linux-headers-$(uname -r)/net/netfilter/nf_conntrack_sip.c 2>/dev/null && echo 'Vulnerable' || echo 'Patched or source unavailable'