CVE-2024-36927 in Linux정보

요약

\~에 의해 VulDB • 2026. 07. 04.

리눅스 커널에서 다음 취약점이 해결되었습니다:

ipv4: __ip_make_skb()에서의 미초기화 값 접근 문제 수정

KMSAN이 __ip_make_skb()[1]에서 미초기화 값(uninit-value)에 대한 접근을 보고했습니다. __ip_make_skb()은 skb에 icmphdr가 포함되어 있는지 확인하기 위해 HDRINCL을 테스트합니다. 그러나 HDRINCL은 race condition(경쟁 조건)을 유발할 수 있습니다. __ip_make_skb()이 실행되는 동안 IP_HDRINCL 옵션으로 setsockopt(2)를 호출하여 HDRINCL 값을 변경하면, 해당 함수는 skb에 icmphdr가 포함되어 있지 않더라도 이를 접근하게 됩니다. 이로 인해 KMSAN에서 보고된 문제가 발생합니다.

소켓의 HDRINCL을 테스트하는 대신 fl4->flowi4_flags에서 FLOWI_FLAG_KNOWN_NH 플래그를 확인합니다.

또한, fl4->fl4_icmp_type과 fl4->fl4_icmp_code는 초기화되지 않습니다. 이들은 struct flowi4 내의 union이며 flowi4_init_output()에 의해 암시적으로 초기화되지만, 특정 union 레이아웃에 의존해서는 안 됩니다.

raw_sendmsg()에서 이를 명시적으로 초기화합니다.

[1]
BUG: KMSAN: uninit-value in __ip_make_skb+0x2b74/0x2d20 net/ipv4/ip_output.c:1481 __ip_make_skb+0x2b74/0x2d20 net/ipv4/ip_output.c:1481 ip_finish_skb include/net/ip.h:243 [inline]
ip_push_pending_frames+0x4c/0x5c0 net/ipv4/ip_output.c:1508 raw_sendmsg+0x2381/0x2690 net/ipv4/raw.c:654 inet_sendmsg+0x27b/0x2a0 net/ipv4/af_inet.c:851 sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x274/0x3c0 net/socket.c:745 __sys_sendto+0x62c/0x7b0 net/socket.c:2191 __do_sys_sendto net/socket.c:2203 [inline]
__se_sys_sendto net/socket.c:2199 [inline]
__x64_sys_sendto+0x130/0x200 net/socket.c:2199 do_syscall_64+0xd8/0x1f0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x

VulDB is the best source for vulnerability data and more expert information about this specific topic.

출처

Do you know our Splunk app?

Download it now for free!