===================================================== BUG: KMSAN: use-after-free in __alloc_skb+0x215/0xa10 net/core/skbuff.c:197 CPU: 1 PID: 28215 Comm: syz-executor.0 Not tainted 5.4.0-rc2+ #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+0x191/0x1f0 lib/dump_stack.c:113 kmsan_report+0x153/0x2c0 mm/kmsan/kmsan_report.c:113 __msan_warning+0x73/0xe0 mm/kmsan/kmsan_instr.c:250 slab_alloc_node mm/slub.c:2751 [inline] kmem_cache_alloc_node+0x5d0/0xe70 mm/slub.c:2830 __alloc_skb+0x215/0xa10 net/core/skbuff.c:197 skb_segment+0x1b95/0x6510 net/core/skbuff.c:3809 tcp_gso_segment+0x83d/0x2680 net/ipv4/tcp_offload.c:98 tcp6_gso_segment+0x20a/0x740 net/ipv6/tcpv6_offload.c:65 ipv6_gso_segment+0x128f/0x1f10 net/ipv6/ip6_offload.c:113 skb_mac_gso_segment+0x3fa/0x720 net/core/dev.c:3037 __skb_gso_segment+0x71d/0xa20 net/core/dev.c:3110 skb_gso_segment include/linux/netdevice.h:4370 [inline] validate_xmit_skb+0xcfd/0x1680 net/core/dev.c:3350 validate_xmit_skb_list+0x17b/0x380 net/core/dev.c:3400 sch_direct_xmit+0x1c5/0x18c0 net/sched/sch_generic.c:299 __dev_xmit_skb net/core/dev.c:3481 [inline] __dev_queue_xmit+0x212d/0x4200 net/core/dev.c:3842 dev_queue_xmit+0x4b/0x60 net/core/dev.c:3906 packet_snd net/packet/af_packet.c:2959 [inline] packet_sendmsg+0x82d7/0x92e0 net/packet/af_packet.c:2984 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] __sys_sendto+0xc44/0xc70 net/socket.c:1952 __do_sys_sendto net/socket.c:1964 [inline] __se_sys_sendto+0x107/0x130 net/socket.c:1960 __x64_sys_sendto+0x6e/0x90 net/socket.c:1960 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x459a59 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f7dbd524c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000000459a59 RDX: 000000000000306c RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 00000000000002ff R10: 0000000004000002 R11: 0000000000000246 R12: 00007f7dbd5256d4 R13: 00000000004c7c6d R14: 00000000004dda70 R15: 00000000ffffffff Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:154 [inline] kmsan_internal_chain_origin+0xde/0x190 mm/kmsan/kmsan.c:325 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:184 ___slab_alloc+0x1dbc/0x1fb0 mm/slub.c:2636 __slab_alloc mm/slub.c:2689 [inline] slab_alloc_node mm/slub.c:2752 [inline] kmem_cache_alloc_node+0x769/0xe70 mm/slub.c:2830 __alloc_skb+0x215/0xa10 net/core/skbuff.c:197 skb_segment+0x1b95/0x6510 net/core/skbuff.c:3809 tcp_gso_segment+0x83d/0x2680 net/ipv4/tcp_offload.c:98 tcp6_gso_segment+0x20a/0x740 net/ipv6/tcpv6_offload.c:65 ipv6_gso_segment+0x128f/0x1f10 net/ipv6/ip6_offload.c:113 skb_mac_gso_segment+0x3fa/0x720 net/core/dev.c:3037 __skb_gso_segment+0x71d/0xa20 net/core/dev.c:3110 skb_gso_segment include/linux/netdevice.h:4370 [inline] validate_xmit_skb+0xcfd/0x1680 net/core/dev.c:3350 validate_xmit_skb_list+0x17b/0x380 net/core/dev.c:3400 sch_direct_xmit+0x1c5/0x18c0 net/sched/sch_generic.c:299 __dev_xmit_skb net/core/dev.c:3481 [inline] __dev_queue_xmit+0x212d/0x4200 net/core/dev.c:3842 dev_queue_xmit+0x4b/0x60 net/core/dev.c:3906 packet_snd net/packet/af_packet.c:2959 [inline] packet_sendmsg+0x82d7/0x92e0 net/packet/af_packet.c:2984 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] __sys_sendto+0xc44/0xc70 net/socket.c:1952 __do_sys_sendto net/socket.c:1964 [inline] __se_sys_sendto+0x107/0x130 net/socket.c:1960 __x64_sys_sendto+0x6e/0x90 net/socket.c:1960 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:154 [inline] kmsan_internal_poison_shadow+0x60/0x120 mm/kmsan/kmsan.c:137 kmsan_slab_free+0x8d/0x100 mm/kmsan/kmsan_hooks.c:123 slab_free_freelist_hook mm/slub.c:1473 [inline] slab_free mm/slub.c:3040 [inline] kmem_cache_free_bulk+0x3ad9/0x3f10 mm/slub.c:3165 __kfree_skb_flush+0xb0/0x100 net/core/skbuff.c:862 net_rx_action+0x1a5e/0x1aa0 net/core/dev.c:6483 __do_softirq+0x4a1/0x83a kernel/softirq.c:293 run_ksoftirqd+0x25/0x40 kernel/softirq.c:607 smpboot_thread_fn+0x4a3/0x990 kernel/smpboot.c:165 kthread+0x4b5/0x4f0 kernel/kthread.c:256 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355 =====================================================