================================================================== BUG: KMSAN: uninit-value in __skb_checksum_complete+0x30e/0x430 net/core/datagram.c:756 CPU: 0 PID: 19592 Comm: syz-executor3 Not tainted 4.17.0+ #16 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+0x188/0x2a0 mm/kmsan/kmsan.c:1352 __msan_warning_32+0x70/0xc0 mm/kmsan/kmsan_instr.c:634 __skb_checksum_complete+0x30e/0x430 net/core/datagram.c:756 __skb_checksum_validate_complete include/linux/skbuff.h:3702 [inline] icmp_rcv+0xf1f/0x1a00 net/ipv4/icmp.c:1027 ip_local_deliver_finish+0x887/0xed0 net/ipv4/ip_input.c:215 NF_HOOK include/linux/netfilter.h:288 [inline] ip_local_deliver+0x43c/0x4e0 net/ipv4/ip_input.c:256 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0xa1b/0x1d10 net/ipv4/ip_input.c:396 NF_HOOK include/linux/netfilter.h:288 [inline] ip_rcv+0x1168/0x16a0 net/ipv4/ip_input.c:492 __netif_receive_skb_core+0x47f3/0x4aa0 net/core/dev.c:4592 __netif_receive_skb net/core/dev.c:4657 [inline] process_backlog+0x62d/0xe20 net/core/dev.c:5337 napi_poll net/core/dev.c:5735 [inline] net_rx_action+0x766/0x1a80 net/core/dev.c:5801 __do_softirq+0x592/0x979 kernel/softirq.c:285 do_softirq_own_stack+0x49/0x80 arch/x86/entry/entry_64.S:1052 do_softirq kernel/softirq.c:329 [inline] __local_bh_enable_ip+0x114/0x140 kernel/softirq.c:182 local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32 icmp_send+0x2498/0x2dc0 net/ipv4/icmp.c:747 ip_fragment+0x38e/0x3f0 net/ipv4/ip_output.c:552 ip_finish_output_gso net/ipv4/ip_output.c:282 [inline] ip_finish_output+0xe71/0x1000 net/ipv4/ip_output.c:312 NF_HOOK_COND include/linux/netfilter.h:277 [inline] ip_output+0x505/0x5d0 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:444 [inline] ip_local_out net/ipv4/ip_output.c:124 [inline] ip_queue_xmit+0x1b0f/0x1d00 net/ipv4/ip_output.c:504 tcp_transmit_skb+0x3db5/0x5350 net/ipv4/tcp_output.c:1176 tcp_write_xmit+0x2d81/0xb200 net/ipv4/tcp_output.c:2373 tcp_push_one+0x195/0x230 net/ipv4/tcp_output.c:2560 tcp_sendmsg_locked+0x400e/0x6610 net/ipv4/tcp.c:1390 tcp_sendmsg+0xb2/0x100 net/ipv4/tcp.c:1447 inet_sendmsg+0x3fc/0x760 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg net/socket.c:639 [inline] __sys_sendto+0x6c4/0x7e0 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0x1a1/0x210 net/socket.c:1797 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x455ab9 RSP: 002b:00007f99bcbccc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f99bcbcd6d4 RCX: 0000000000455ab9 RDX: fffffffffffffe4e RSI: 0000000020000000 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 00000000200000c0 R09: 0000000000000006 R10: 00000000000000c0 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004c0f1a R14: 00000000004d0e40 R15: 0000000000000000 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:287 [inline] kmsan_save_stack mm/kmsan/kmsan.c:302 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:692 kmsan_memcpy_origins+0x11d/0x170 mm/kmsan/kmsan.c:535 __msan_memcpy+0xda/0x130 mm/kmsan/kmsan_instr.c:427 csum_partial_copy+0xbd/0x520 lib/checksum.c:178 skb_copy_and_csum_bits+0x715/0x10c0 net/core/skbuff.c:2595 icmp_glue_bits+0x164/0x370 net/ipv4/icmp.c:357 __ip_append_data+0x3576/0x4020 net/ipv4/ip_output.c:1018 ip_append_data+0x2fb/0x440 net/ipv4/ip_output.c:1181 icmp_push_reply+0x23f/0x830 net/ipv4/icmp.c:375 icmp_send+0x242e/0x2dc0 net/ipv4/icmp.c:741 ip_fragment+0x38e/0x3f0 net/ipv4/ip_output.c:552 ip_finish_output_gso net/ipv4/ip_output.c:282 [inline] ip_finish_output+0xe71/0x1000 net/ipv4/ip_output.c:312 NF_HOOK_COND include/linux/netfilter.h:277 [inline] ip_output+0x505/0x5d0 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:444 [inline] ip_local_out net/ipv4/ip_output.c:124 [inline] ip_queue_xmit+0x1b0f/0x1d00 net/ipv4/ip_output.c:504 tcp_transmit_skb+0x3db5/0x5350 net/ipv4/tcp_output.c:1176 tcp_write_xmit+0x2d81/0xb200 net/ipv4/tcp_output.c:2373 tcp_push_one+0x195/0x230 net/ipv4/tcp_output.c:2560 tcp_sendmsg_locked+0x400e/0x6610 net/ipv4/tcp.c:1390 tcp_sendmsg+0xb2/0x100 net/ipv4/tcp.c:1447 inet_sendmsg+0x3fc/0x760 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg net/socket.c:639 [inline] __sys_sendto+0x6c4/0x7e0 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0x1a1/0x210 net/socket.c:1797 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:287 [inline] kmsan_alloc_meta_for_pages+0x166/0x3b0 mm/kmsan/kmsan.c:819 kmsan_alloc_page+0x82/0xe0 mm/kmsan/kmsan.c:1061 __alloc_pages_nodemask+0xf7b/0x5cc0 mm/page_alloc.c:4404 alloc_pages_current+0x6b1/0x970 mm/mempolicy.c:2093 alloc_pages include/linux/gfp.h:494 [inline] skb_page_frag_refill+0x3ba/0x5e0 net/core/sock.c:2211 sk_page_frag_refill+0xa4/0x350 net/core/sock.c:2231 tcp_sendmsg_locked+0x2621/0x6610 net/ipv4/tcp.c:1325 tcp_sendmsg+0xb2/0x100 net/ipv4/tcp.c:1447 inet_sendmsg+0x3fc/0x760 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg net/socket.c:639 [inline] sock_write_iter+0x3bc/0x470 net/socket.c:908 do_iter_readv_writev+0x81c/0xa20 include/linux/fs.h:1778 do_iter_write+0x30d/0xd50 fs/read_write.c:959 vfs_writev fs/read_write.c:1004 [inline] do_writev+0x3be/0x820 fs/read_write.c:1039 __do_sys_writev fs/read_write.c:1112 [inline] __se_sys_writev fs/read_write.c:1109 [inline] __x64_sys_writev+0xe1/0x120 fs/read_write.c:1109 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x63/0xe7 ==================================================================