In the Linux kernel, the following vulnerability has been resolved:
ipvs: fix uninit-value for saddr in do_output_route4
syzbot reports for uninit-value for the saddr argument [1].
commit 4754957f04f5 ("ipvs: do not use random local source address for
tunnels") already implies that the input value of saddr
should be ignored but the code is still reading it which can prevent
to connect the route. Fix it by changing the argument to ret_saddr.
[1]
BUG: KMSAN: uninit-value in do_output_route4+0x42c/0x4d0net/netfilter/ipvs/ip_vs_xmit.c:147do_output_route4+0x42c/0x4d0net/netfilter/ipvs/ip_vs_xmit.c:147__ip_vs_get_out_rt+0x403/0x21d0net/netfilter/ipvs/ip_vs_xmit.c:330ip_vs_tunnel_xmit+0x205/0x2380net/netfilter/ipvs/ip_vs_xmit.c:1136ip_vs_in_hook+0x1aa5/0x35b0net/netfilter/ipvs/ip_vs_core.c:2063nf_hook_entry_hookfninclude/linux/netfilter.h:154[inline]nf_hook_slow+0xf7/0x400net/netfilter/core.c:626nf_hookinclude/linux/netfilter.h:269[inline]__ip_local_out+0x758/0x7e0net/ipv4/ip_output.c:118ip_local_outnet/ipv4/ip_output.c:127[inline]ip_send_skb+0x6a/0x3c0net/ipv4/ip_output.c:1501udp_send_skb+0xfda/0x1b70net/ipv4/udp.c:1195udp_sendmsg+0x2fe3/0x33c0net/ipv4/udp.c:1483inet_sendmsg+0x1fc/0x280net/ipv4/af_inet.c:851sock_sendmsg_nosecnet/socket.c:712[inline]__sock_sendmsg+0x267/0x380net/socket.c:727____sys_sendmsg+0x91b/0xda0net/socket.c:2566___sys_sendmsg+0x28d/0x3c0net/socket.c:2620__sys_sendmmsg+0x41d/0x880net/socket.c:2702__compat_sys_sendmmsgnet/compat.c:360[inline]__do_compat_sys_sendmmsgnet/compat.c:367[inline]__se_compat_sys_sendmmsgnet/compat.c:364[inline]__ia32_compat_sys_sendmmsg+0xc8/0x140net/compat.c:364ia32_sys_call+0x3ffa/0x41f0arch/x86/include/generated/asm/syscalls_32.h:346do_syscall_32_irqs_onarch/x86/entry/syscall_32.c:83[inline]__do_fast_syscall_32+0xb0/0x110arch/x86/entry/syscall_32.c:306do_fast_syscall_32+0x38/0x80arch/x86/entry/syscall_32.c:331do_SYSENTER_32+0x1f/0x30arch/x86/entry/syscall_32.c:369entry_SYSENTER_compat_after_hwframe+0x84/0x8eUninit was created at:slab_post_alloc_hookmm/slub.c:4167[inline]slab_alloc_nodemm/slub.c:4210[inline]__kmalloc_cache_noprof+0x8fa/0xe00mm/slub.c:4367kmalloc_noprofinclude/linux/slab.h:905[inline]ip_vs_dest_dst_allocnet/netfilter/ipvs/ip_vs_xmit.c:61[inline]__ip_vs_get_out_rt+0x35d/0x21d0net/netfilter/ipvs/ip_vs_xmit.c:323ip_vs_tunnel_xmit+0x205/0x2380net/netfilter/ipvs/ip_vs_xmit.c:1136ip_vs_in_hook+0x1aa5/0x35b0net/netfilter/ipvs/ip_vs_core.c:2063nf_hook_entry_hookfninclude/linux/netfilter.h:154[inline]nf_hook_slow+0xf7/0x400net/netfilter/core.c:626nf_hookinclude/linux/netfilter.h:269[inline]__ip_local_out+0x758/0x7e0net/ipv4/ip_output.c:118ip_local_outnet/ipv4/ip_output.c:127[inline]ip_send_skb+0x6a/0x3c0net/ipv4/ip_output.c:1501udp_send_skb+0xfda/0x1b70net/ipv4/udp.c:1195udp_sendmsg+0x2fe3/0x33c0net/ipv4/udp.c:1483inet_sendmsg+0x1fc/0x280net/ipv4/af_inet.c:851sock_sendmsg_nosecnet/socket.c:712[inline]__sock_sendmsg+0x267/0x380net/socket.c:727____sys_sendmsg+0x91b/0xda0net/socket.c:2566___sys_sendmsg+0x28d/0x3c0net/socket.c:2620__sys_sendmmsg+0x41d/0x880net/socket.c:2702__compat_sys_sendmmsgnet/compat.c:360[inline]__do_compat_sys_sendmmsgnet/compat.c:367[inline]__se_compat_sys_sendmmsgnet/compat.c:364[inline]__ia32_compat_sys_sendmmsg+0xc8/0x140net/compat.c:364ia32_sys_call+0x3ffa/0x41f0arch/x86/include/generated/asm/syscalls_32.h:346do_syscall_32_irqs_onarch/x86/entry/syscall_32.c:83[inline]__do_fast_syscall_32+0xb0/0x110arch/x86/entry/syscall_32.c:306do_fast_syscall_32+0x38/0x80arch/x86/entry/syscall_32.c:331do_SYSENTER_32+0x1f/0x30arch/x86/entry/syscall_32.c:369entry_SYSENTER_compat_after_hwframe+0x84/0x8eCPU: 0 UID: 0 PID: 22408 Comm: syz.4.5165 Not tainted 6.15.0-rc3-syzkaller-00019-gbc3372351d0c #0 PREEMPT(undef)
Hardware name: Google Google Compute Engi