===================================================== BUG: KMSAN: uninit-value in __skb_checksum_complete+0x37f/0x540 net/core/skbuff.c:2850 CPU: 0 PID: 14599 Comm: syz-executor.3 Not tainted 5.7.0-rc4-syzkaller #0 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+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 __skb_checksum_complete+0x37f/0x540 net/core/skbuff.c:2850 nf_ip_checksum+0x53b/0x740 net/netfilter/utils.c:36 nf_nat_icmp_reply_translation+0x2ba/0x980 net/netfilter/nf_nat_proto.c:580 nf_nat_ipv4_fn net/netfilter/nf_nat_proto.c:639 [inline] nf_nat_ipv4_local_fn+0x215/0x830 net/netfilter/nf_nat_proto.c:710 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline] nf_hook_slow+0x16e/0x400 net/netfilter/core.c:512 nf_hook include/linux/netfilter.h:262 [inline] __ip_local_out+0x69b/0x800 net/ipv4/ip_output.c:114 ip_local_out net/ipv4/ip_output.c:123 [inline] ip_send_skb net/ipv4/ip_output.c:1560 [inline] ip_push_pending_frames+0x16f/0x460 net/ipv4/ip_output.c:1580 icmp_push_reply+0x660/0x710 net/ipv4/icmp.c:390 __icmp_send+0x2361/0x30f0 net/ipv4/icmp.c:740 ipv4_send_dest_unreach net/ipv4/route.c:1223 [inline] ipv4_link_failure+0x7be/0xb70 net/ipv4/route.c:1230 dst_link_failure include/net/dst.h:418 [inline] arp_error_report+0x106/0x1a0 net/ipv4/arp.c:293 neigh_invalidate+0x348/0x8d0 net/core/neighbour.c:993 neigh_timer_handler+0xb1a/0x1530 net/core/neighbour.c:1080 call_timer_fn+0x218/0x510 kernel/time/timer.c:1405 expire_timers kernel/time/timer.c:1450 [inline] __run_timers+0xcff/0x1210 kernel/time/timer.c:1774 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1787 __do_softirq+0x311/0x83d kernel/softirq.c:293 invoke_softirq kernel/softirq.c:375 [inline] irq_exit+0x230/0x280 kernel/softirq.c:416 exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:546 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1143 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:834 RIP: 0010:pfn_valid include/linux/mmzone.h:1325 [inline] RIP: 0010:kmsan_virt_addr_valid mm/kmsan/kmsan_shadow.c:91 [inline] RIP: 0010:virt_to_page_or_null+0x79/0xf0 mm/kmsan/kmsan_shadow.c:129 Code: 2f 48 89 d6 48 c1 ee 22 4c 8b 0c f1 4d 85 c9 74 1f 48 89 d6 48 c1 ee 1b 83 e6 7f 48 c1 e6 05 4c 89 c9 48 01 f1 74 09 4c 8b 01 <41> f6 c0 02 75 04 31 c0 5d c3 41 f6 c0 08 75 12 48 c1 ea 15 49 8b RSP: 0018:ffffb8f041fd2f20 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: ffffa40f83964008 RBX: ffffa40f03964008 RCX: ffffa40eefffb500 RDX: 0000000143964008 RSI: 0000000000000500 RDI: ffffa40f03964008 RBP: ffffb8f041fd2f20 R08: fffff9cc8000000f R09: ffffa40eefffb000 R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000000a R13: ffffa40f03964008 R14: 0000000000000001 R15: 0000000000000000 kmsan_get_metadata+0x11d/0x180 mm/kmsan/kmsan_shadow.c:194 kmsan_get_shadow_origin_ptr+0x81/0xb0 mm/kmsan/kmsan_shadow.c:154 __msan_metadata_ptr_for_load_8+0x10/0x20 mm/kmsan/kmsan_instr.c:55 xfrm_state_find+0xfd4/0x6b40 include/linux/compiler.h:206 xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2396 [inline] xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2441 [inline] xfrm_resolve_and_create_bundle+0x8d1/0x49b0 net/xfrm/xfrm_policy.c:2731 xfrm_lookup_with_ifid+0x54f/0x3c30 net/xfrm/xfrm_policy.c:3054 xfrm_lookup net/xfrm/xfrm_policy.c:3178 [inline] xfrm_lookup_route+0x100/0x370 net/xfrm/xfrm_policy.c:3189 ip6_dst_lookup_flow+0x209/0x250 net/ipv6/ip6_output.c:1160 rawv6_sendmsg+0x1c61/0x5c30 net/ipv6/raw.c:928 inet_sendmsg+0x2d8/0x2e0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x1056/0x1350 net/socket.c:2362 ___sys_sendmsg net/socket.c:2416 [inline] __sys_sendmmsg+0x5fe/0xd60 net/socket.c:2506 __do_sys_sendmmsg net/socket.c:2535 [inline] __se_sys_sendmmsg+0xbd/0xe0 net/socket.c:2532 __x64_sys_sendmmsg+0x56/0x70 net/socket.c:2532 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45cba9 Code: 8d b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 5b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f316345bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00000000004ff000 RCX: 000000000045cba9 RDX: 00000000000002e9 RSI: 0000000020000480 RDI: 0000000000000007 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000f000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000093b R14: 00000000004cc08a R15: 00007f316345c6d4 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310 kmsan_memcpy_memmove_metadata+0x272/0x2e0 mm/kmsan/kmsan.c:247 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:267 __msan_memcpy+0x43/0x50 mm/kmsan/kmsan_instr.c:116 csum_partial_copy+0xae/0x100 lib/checksum.c:174 skb_copy_and_csum_bits+0x227/0x1130 net/core/skbuff.c:2737 icmp_glue_bits+0x166/0x380 net/ipv4/icmp.c:353 __ip_append_data+0x47c4/0x5660 net/ipv4/ip_output.c:1131 ip_append_data+0x328/0x480 net/ipv4/ip_output.c:1315 icmp_push_reply+0x206/0x710 net/ipv4/icmp.c:371 __icmp_send+0x2361/0x30f0 net/ipv4/icmp.c:740 ipv4_send_dest_unreach net/ipv4/route.c:1223 [inline] ipv4_link_failure+0x7be/0xb70 net/ipv4/route.c:1230 dst_link_failure include/net/dst.h:418 [inline] arp_error_report+0x106/0x1a0 net/ipv4/arp.c:293 neigh_invalidate+0x348/0x8d0 net/core/neighbour.c:993 neigh_timer_handler+0xb1a/0x1530 net/core/neighbour.c:1080 call_timer_fn+0x218/0x510 kernel/time/timer.c:1405 expire_timers kernel/time/timer.c:1450 [inline] __run_timers+0xcff/0x1210 kernel/time/timer.c:1774 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1787 __do_softirq+0x311/0x83d kernel/softirq.c:293 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310 kmsan_memcpy_memmove_metadata+0x272/0x2e0 mm/kmsan/kmsan.c:247 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:267 __msan_memcpy+0x43/0x50 mm/kmsan/kmsan_instr.c:116 pskb_expand_head+0x38b/0x1b00 net/core/skbuff.c:1636 __skb_cow include/linux/skbuff.h:3171 [inline] skb_cow_head include/linux/skbuff.h:3205 [inline] ip_tunnel_xmit+0x2a10/0x34f0 net/ipv4/ip_tunnel.c:807 __gre_xmit net/ipv4/ip_gre.c:448 [inline] erspan_xmit+0x1779/0x2ae0 net/ipv4/ip_gre.c:683 __netdev_start_xmit include/linux/netdevice.h:4533 [inline] netdev_start_xmit include/linux/netdevice.h:4547 [inline] xmit_one net/core/dev.c:3477 [inline] dev_hard_start_xmit+0x531/0xab0 net/core/dev.c:3493 sch_direct_xmit+0x512/0x18b0 net/sched/sch_generic.c:314 qdisc_restart net/sched/sch_generic.c:377 [inline] __qdisc_run+0x15ec/0x3350 net/sched/sch_generic.c:385 qdisc_run include/net/pkt_sched.h:134 [inline] __dev_xmit_skb net/core/dev.c:3668 [inline] __dev_queue_xmit+0x23b7/0x3b20 net/core/dev.c:4021 dev_queue_xmit+0x4b/0x60 net/core/dev.c:4085 neigh_resolve_output+0xab0/0xb40 net/core/neighbour.c:1489 neigh_output include/net/neighbour.h:510 [inline] ip_finish_output2+0x1acc/0x2610 net/ipv4/ip_output.c:228 __ip_finish_output+0xaa7/0xd80 net/ipv4/ip_output.c:306 ip_finish_output+0x166/0x410 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip_output+0x593/0x680 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:435 [inline] ip_local_out net/ipv4/ip_output.c:125 [inline] ip_send_skb+0x179/0x360 net/ipv4/ip_output.c:1560 udp_send_skb+0x1046/0x18b0 net/ipv4/udp.c:891 udp_sendmsg+0x3bb5/0x4100 net/ipv4/udp.c:1178 inet_sendmsg+0x276/0x2e0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x1056/0x1350 net/socket.c:2362 ___sys_sendmsg net/socket.c:2416 [inline] __sys_sendmsg+0x623/0x750 net/socket.c:2449 __do_sys_sendmsg net/socket.c:2458 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2456 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2456 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:80 slab_alloc_node mm/slub.c:2802 [inline] __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4436 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1083 [inline] alloc_skb_with_frags+0x18c/0xa70 net/core/skbuff.c:5772 sock_alloc_send_pskb+0xada/0xc60 net/core/sock.c:2265 sock_alloc_send_skb+0xca/0xe0 net/core/sock.c:2282 __ip_append_data+0x3b41/0x5660 net/ipv4/ip_output.c:1089 ip_make_skb+0x394/0x880 net/ipv4/ip_output.c:1626 udp_sendmsg+0x36dc/0x4100 net/ipv4/udp.c:1173 inet_sendmsg+0x276/0x2e0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x1056/0x1350 net/socket.c:2362 ___sys_sendmsg net/socket.c:2416 [inline] __sys_sendmsg+0x623/0x750 net/socket.c:2449 __do_sys_sendmsg net/socket.c:2458 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2456 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2456 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x44/0xa9 =====================================================