===================================================== BUG: KMSAN: uninit-value in ____bpf_skb_get_nlattr net/core/filter.c:144 [inline] BUG: KMSAN: uninit-value in bpf_skb_get_nlattr+0x145/0x290 net/core/filter.c:134 CPU: 0 PID: 8462 Comm: syz-fuzzer Not tainted 5.8.0-rc5-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+0x1df/0x240 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 ____bpf_skb_get_nlattr net/core/filter.c:144 [inline] bpf_skb_get_nlattr+0x145/0x290 net/core/filter.c:134 ___bpf_prog_run+0x214d/0x97a0 kernel/bpf/core.c:1516 __bpf_prog_run32+0x101/0x170 kernel/bpf/core.c:1681 bpf_dispatcher_nop_func include/linux/bpf.h:556 [inline] bpf_prog_run_pin_on_cpu include/linux/filter.h:597 [inline] bpf_prog_run_clear_cb include/linux/filter.h:719 [inline] run_filter net/packet/af_packet.c:2012 [inline] packet_rcv+0x70f/0x2150 net/packet/af_packet.c:2085 dev_queue_xmit_nit+0x11a0/0x1280 net/core/dev.c:2355 xmit_one net/core/dev.c:3552 [inline] dev_hard_start_xmit+0x20c/0xa70 net/core/dev.c:3572 __dev_queue_xmit+0x2f8d/0x3b20 net/core/dev.c:4131 dev_queue_xmit+0x4b/0x60 net/core/dev.c:4164 neigh_hh_output include/net/neighbour.h:498 [inline] neigh_output include/net/neighbour.h:507 [inline] ip6_finish_output2+0x2057/0x2620 net/ipv6/ip6_output.c:117 __ip6_finish_output+0x824/0x8e0 net/ipv6/ip6_output.c:143 ip6_finish_output+0x166/0x410 net/ipv6/ip6_output.c:153 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x60a/0x770 net/ipv6/ip6_output.c:176 dst_output include/net/dst.h:443 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ip6_xmit+0x1f67/0x2710 net/ipv6/ip6_output.c:280 inet6_csk_xmit+0x42b/0x570 net/ipv6/inet6_connection_sock.c:135 __tcp_transmit_skb+0x440e/0x6090 net/ipv4/tcp_output.c:1240 __tcp_send_ack+0x701/0x840 net/ipv4/tcp_output.c:3787 tcp_send_ack+0x68/0x90 net/ipv4/tcp_output.c:3793 tcp_delack_timer_handler+0x4f3/0x9b0 net/ipv4/tcp_timer.c:305 tcp_delack_timer+0x1a5/0x370 net/ipv4/tcp_timer.c:332 call_timer_fn+0x218/0x510 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers+0xd20/0x11c0 kernel/time/timer.c:1773 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1786 __do_softirq+0x311/0x83d kernel/softirq.c:293 asm_call_on_stack+0x12/0x20 arch/x86/entry/entry_64.S:711 __run_on_irqstack arch/x86/include/asm/irq_stack.h:23 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:50 [inline] do_softirq_own_stack+0x7c/0xa0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:390 [inline] __irq_exit_rcu+0x226/0x270 kernel/softirq.c:420 irq_exit_rcu+0xe/0x10 kernel/softirq.c:432 sysvec_apic_timer_interrupt+0x107/0x130 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:593 RIP: 0010:kmsan_slab_alloc+0xb4/0xe0 mm/kmsan/kmsan_hooks.c:83 Code: eb 0a ba 01 00 00 00 e8 1a ed ff ff be ff ff ff ff 65 0f c1 35 cd e0 91 7c ff ce 75 1c e8 44 6c 2e ff 4c 89 65 d8 ff 75 d8 9d <48> 83 c4 10 5b 41 5c 41 5e 41 5f 5d c3 0f 0b 48 c7 c7 ea 03 ca 90 RSP: 0018:ffffa2fc80e7b598 EFLAGS: 00000246 RAX: a40a702d9e74e900 RBX: ffff9423d995bc00 RCX: 0000000000000101 RDX: 0000000000000100 RSI: 0000000000000000 RDI: ffff9423d995bc00 RBP: ffffa2fc80e7b5c8 R08: fffff3b08000000f R09: ffff9424efffb000 R10: 000000000000000f R11: ffffffff9020083d R12: 0000000000000246 R13: ffff9424ef402c40 R14: 0000000000082cc0 R15: ffff9424ef402c40 slab_alloc_node mm/slub.c:2839 [inline] __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4478 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:210 alloc_skb_fclone include/linux/skbuff.h:1133 [inline] sk_stream_alloc_skb+0x3ee/0x1180 net/ipv4/tcp.c:884 tcp_sendmsg_locked+0x28b0/0x6d00 net/ipv4/tcp.c:1291 tcp_sendmsg+0xb2/0x100 net/ipv4/tcp.c:1441 inet_sendmsg+0x178/0x2e0 net/ipv4/af_inet.c:814 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] sock_write_iter+0x651/0x720 net/socket.c:999 call_write_iter include/linux/fs.h:1908 [inline] new_sync_write fs/read_write.c:503 [inline] vfs_write+0xd98/0x1480 fs/read_write.c:578 ksys_write+0x267/0x450 fs/read_write.c:631 __do_sys_write fs/read_write.c:643 [inline] __se_sys_write+0x92/0xb0 fs/read_write.c:640 __x64_sys_write+0x4a/0x70 fs/read_write.c:640 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4b3d8b Code: Bad RIP value. RSP: 002b:000000c00b0214e0 EFLAGS: 00000206 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000c00002c000 RCX: 00000000004b3d8b RDX: 00000000000000f0 RSI: 000000c00000a200 RDI: 0000000000000006 RBP: 000000c00b021530 R08: 000000c00000a201 R09: 00000000000000f0 R10: 0000000000000003 R11: 0000000000000206 R12: 0000000000000003 R13: 0000000000000410 R14: 000000000000007f R15: 00000000000009a1 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 __msan_chain_origin+0x50/0x90 mm/kmsan/kmsan_instr.c:165 ___bpf_prog_run+0x6cbe/0x97a0 kernel/bpf/core.c:1391 __bpf_prog_run32+0x101/0x170 kernel/bpf/core.c:1681 bpf_dispatcher_nop_func include/linux/bpf.h:556 [inline] bpf_prog_run_pin_on_cpu include/linux/filter.h:597 [inline] bpf_prog_run_clear_cb include/linux/filter.h:719 [inline] run_filter net/packet/af_packet.c:2012 [inline] packet_rcv+0x70f/0x2150 net/packet/af_packet.c:2085 dev_queue_xmit_nit+0x11a0/0x1280 net/core/dev.c:2355 xmit_one net/core/dev.c:3552 [inline] dev_hard_start_xmit+0x20c/0xa70 net/core/dev.c:3572 __dev_queue_xmit+0x2f8d/0x3b20 net/core/dev.c:4131 dev_queue_xmit+0x4b/0x60 net/core/dev.c:4164 neigh_hh_output include/net/neighbour.h:498 [inline] neigh_output include/net/neighbour.h:507 [inline] ip6_finish_output2+0x2057/0x2620 net/ipv6/ip6_output.c:117 __ip6_finish_output+0x824/0x8e0 net/ipv6/ip6_output.c:143 ip6_finish_output+0x166/0x410 net/ipv6/ip6_output.c:153 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x60a/0x770 net/ipv6/ip6_output.c:176 dst_output include/net/dst.h:443 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ip6_xmit+0x1f67/0x2710 net/ipv6/ip6_output.c:280 inet6_csk_xmit+0x42b/0x570 net/ipv6/inet6_connection_sock.c:135 __tcp_transmit_skb+0x440e/0x6090 net/ipv4/tcp_output.c:1240 __tcp_send_ack+0x701/0x840 net/ipv4/tcp_output.c:3787 tcp_send_ack+0x68/0x90 net/ipv4/tcp_output.c:3793 tcp_delack_timer_handler+0x4f3/0x9b0 net/ipv4/tcp_timer.c:305 tcp_delack_timer+0x1a5/0x370 net/ipv4/tcp_timer.c:332 call_timer_fn+0x218/0x510 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers+0xd20/0x11c0 kernel/time/timer.c:1773 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1786 __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 __msan_chain_origin+0x50/0x90 mm/kmsan/kmsan_instr.c:165 ___bpf_prog_run+0x6c64/0x97a0 kernel/bpf/core.c:1391 __bpf_prog_run32+0x101/0x170 kernel/bpf/core.c:1681 bpf_dispatcher_nop_func include/linux/bpf.h:556 [inline] bpf_prog_run_pin_on_cpu include/linux/filter.h:597 [inline] bpf_prog_run_clear_cb include/linux/filter.h:719 [inline] run_filter net/packet/af_packet.c:2012 [inline] packet_rcv+0x70f/0x2150 net/packet/af_packet.c:2085 dev_queue_xmit_nit+0x11a0/0x1280 net/core/dev.c:2355 xmit_one net/core/dev.c:3552 [inline] dev_hard_start_xmit+0x20c/0xa70 net/core/dev.c:3572 __dev_queue_xmit+0x2f8d/0x3b20 net/core/dev.c:4131 dev_queue_xmit+0x4b/0x60 net/core/dev.c:4164 neigh_hh_output include/net/neighbour.h:498 [inline] neigh_output include/net/neighbour.h:507 [inline] ip6_finish_output2+0x2057/0x2620 net/ipv6/ip6_output.c:117 __ip6_finish_output+0x824/0x8e0 net/ipv6/ip6_output.c:143 ip6_finish_output+0x166/0x410 net/ipv6/ip6_output.c:153 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x60a/0x770 net/ipv6/ip6_output.c:176 dst_output include/net/dst.h:443 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ip6_xmit+0x1f67/0x2710 net/ipv6/ip6_output.c:280 inet6_csk_xmit+0x42b/0x570 net/ipv6/inet6_connection_sock.c:135 __tcp_transmit_skb+0x440e/0x6090 net/ipv4/tcp_output.c:1240 __tcp_send_ack+0x701/0x840 net/ipv4/tcp_output.c:3787 tcp_send_ack+0x68/0x90 net/ipv4/tcp_output.c:3793 tcp_delack_timer_handler+0x4f3/0x9b0 net/ipv4/tcp_timer.c:305 tcp_delack_timer+0x1a5/0x370 net/ipv4/tcp_timer.c:332 call_timer_fn+0x218/0x510 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers+0xd20/0x11c0 kernel/time/timer.c:1773 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1786 __do_softirq+0x311/0x83d kernel/softirq.c:293 Local variable ----regs@__bpf_prog_run32 created at: __bpf_prog_run32+0x87/0x170 kernel/bpf/core.c:1681 __bpf_prog_run32+0x87/0x170 kernel/bpf/core.c:1681 =====================================================