================================================================== BUG: KMSAN: uninit-value in copyout lib/iov_iter.c:140 [inline] BUG: KMSAN: uninit-value in _copy_to_iter+0x1b14/0x2800 lib/iov_iter.c:571 CPU: 1 PID: 5386 Comm: syz-executor4 Not tainted 4.17.0-rc5+ #103 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:113 kmsan_report+0x149/0x260 mm/kmsan/kmsan.c:1084 kmsan_internal_check_memory+0x135/0x1e0 mm/kmsan/kmsan.c:1177 kmsan_copy_to_user+0x75/0x160 mm/kmsan/kmsan.c:1219 copyout lib/iov_iter.c:140 [inline] _copy_to_iter+0x1b14/0x2800 lib/iov_iter.c:571 copy_to_iter include/linux/uio.h:106 [inline] skb_copy_datagram_iter+0x443/0xf70 net/core/datagram.c:431 skb_copy_datagram_msg include/linux/skbuff.h:3268 [inline] netlink_recvmsg+0x6f1/0x1900 net/netlink/af_netlink.c:1959 sock_recvmsg_nosec net/socket.c:802 [inline] sock_recvmsg+0x1d0/0x230 net/socket.c:809 ___sys_recvmsg+0x3fb/0x810 net/socket.c:2279 __sys_recvmmsg+0x58e/0xe30 net/socket.c:2391 do_sys_recvmmsg+0x2a6/0x3e0 net/socket.c:2472 __do_sys_recvmmsg net/socket.c:2485 [inline] __se_sys_recvmmsg net/socket.c:2481 [inline] __x64_sys_recvmmsg+0x15d/0x1c0 net/socket.c:2481 do_syscall_64+0x152/0x230 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x455a09 RSP: 002b:00007f0bb78c0c68 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f0bb78c16d4 RCX: 0000000000455a09 RDX: 0000000000000009 RSI: 00000000200042c0 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000020004500 R09: 0000000000000000 R10: 0000000000000020 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000574 R14: 00000000006fd380 R15: 0000000000000000 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:279 [inline] kmsan_save_stack mm/kmsan/kmsan.c:294 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:685 kmsan_memcpy_origins+0x11d/0x170 mm/kmsan/kmsan.c:527 __msan_memcpy+0x109/0x160 mm/kmsan/kmsan_instr.c:478 __nla_put lib/nlattr.c:569 [inline] nla_put+0x276/0x340 lib/nlattr.c:627 copy_to_user_policy_type net/xfrm/xfrm_user.c:1678 [inline] build_acquire net/xfrm/xfrm_user.c:2850 [inline] xfrm_send_acquire+0x1068/0x1690 net/xfrm/xfrm_user.c:2873 km_query net/xfrm/xfrm_state.c:1953 [inline] xfrm_state_find+0x3aae/0x4f70 net/xfrm/xfrm_state.c:1021 xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:1393 [inline] xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:1437 [inline] xfrm_resolve_and_create_bundle+0xc31/0x5270 net/xfrm/xfrm_policy.c:1833 xfrm_lookup+0x606/0x39e0 net/xfrm/xfrm_policy.c:2163 xfrm_lookup_route+0xfa/0x360 net/xfrm/xfrm_policy.c:2283 ip_route_output_flow+0x35b/0x3b0 net/ipv4/route.c:2563 udp_sendmsg+0x2499/0x33d0 net/ipv4/udp.c:1008 udpv6_sendmsg+0x1291/0x3f40 net/ipv6/udp.c:1175 inet_sendmsg+0x3f7/0x750 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg net/socket.c:639 [inline] ___sys_sendmsg+0xec0/0x1310 net/socket.c:2117 __sys_sendmsg net/socket.c:2155 [inline] __do_sys_sendmsg net/socket.c:2164 [inline] __se_sys_sendmsg net/socket.c:2162 [inline] __x64_sys_sendmsg+0x331/0x460 net/socket.c:2162 do_syscall_64+0x152/0x230 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Local variable description: ----upt.i.i@xfrm_send_acquire Variable was created at: xfrm_send_acquire+0x73/0x1690 net/xfrm/xfrm_user.c:2864 km_query net/xfrm/xfrm_state.c:1953 [inline] xfrm_state_find+0x3aae/0x4f70 net/xfrm/xfrm_state.c:1021 Byte 46 of 53 is uninitialized Memory access starts at ffff88013cc7dd43 ==================================================================