===================================================== 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: 1 PID: 9080 Comm: syz-executor.1 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 sch_direct_xmit+0x580/0x1890 net/sched/sch_generic.c:314 qdisc_restart net/sched/sch_generic.c:377 [inline] __qdisc_run+0x155c/0x33a0 net/sched/sch_generic.c:385 qdisc_run include/net/pkt_sched.h:134 [inline] __dev_xmit_skb net/core/dev.c:3747 [inline] __dev_queue_xmit+0x23b7/0x3b20 net/core/dev.c:4100 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] ndisc_send_skb+0x1047/0x15a0 net/ipv6/ndisc.c:506 ndisc_send_rs+0xbd8/0xc30 net/ipv6/ndisc.c:700 addrconf_rs_timer+0x62f/0xcf0 net/ipv6/addrconf.c:3848 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_get_metadata+0x6/0x180 mm/kmsan/kmsan_shadow.c:175 Code: c7 b4 06 0a 98 48 c7 c6 d5 06 0a 98 4c 89 f2 31 c0 e8 b0 e4 44 ff 0f 0b 66 90 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 <41> 56 53 41 89 d6 48 89 fb 48 83 e3 fc 85 d2 48 0f 44 df 40 f6 c7 RSP: 0018:ffffa49280e53208 EFLAGS: 00000282 RAX: ffffa37d4d2f21bc RBX: ffffa37d4d2f21bc RCX: 0000000000a41eba RDX: 0000000000000001 RSI: 00000000000007c0 RDI: ffffffff982ff1bc RBP: ffffa49280e53210 R08: ffffe0b04000000f R09: ffffa37c6fffb000 R10: 0000000004a10000 R11: 0000000000000000 R12: ffffffff982ff1b5 R13: 0000000000000000 R14: ffffffff982ff1bc R15: 0000000000000000 kmsan_get_shadow_origin_ptr+0x81/0xb0 mm/kmsan/kmsan_shadow.c:154 __msan_metadata_ptr_for_load_1+0x10/0x20 mm/kmsan/kmsan_instr.c:52 strlen+0x49/0xa0 lib/string.c:552 find_entry fs/proc/proc_sysctl.c:128 [inline] find_subdir fs/proc/proc_sysctl.c:939 [inline] get_subdir fs/proc/proc_sysctl.c:993 [inline] __register_sysctl_table+0x13af/0x2950 fs/proc/proc_sysctl.c:1343 register_net_sysctl+0x9f/0xb0 net/sysctl_net.c:121 neigh_sysctl_register+0x9cc/0xd10 net/core/neighbour.c:3694 addrconf_sysctl_register+0x156/0x370 net/ipv6/addrconf.c:6943 ipv6_add_dev+0x1554/0x18e0 net/ipv6/addrconf.c:443 addrconf_notify+0xc0a/0x5ae0 net/ipv6/addrconf.c:3462 notifier_call_chain kernel/notifier.c:83 [inline] __raw_notifier_call_chain kernel/notifier.c:361 [inline] raw_notifier_call_chain+0x130/0x250 kernel/notifier.c:368 call_netdevice_notifiers_info net/core/dev.c:2027 [inline] call_netdevice_notifiers_extack net/core/dev.c:2039 [inline] call_netdevice_notifiers net/core/dev.c:2053 [inline] register_netdevice+0x2c5d/0x3290 net/core/dev.c:9545 register_netdev+0x93/0xd0 net/core/dev.c:9645 loopback_net_init+0x10a/0x320 drivers/net/loopback.c:216 ops_init+0x2d3/0x730 net/core/net_namespace.c:151 setup_net+0x286/0x12b0 net/core/net_namespace.c:341 copy_net_ns+0x551/0xa70 net/core/net_namespace.c:482 create_new_namespaces+0x9a8/0x11e0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x25e/0x340 kernel/nsproxy.c:231 ksys_unshare+0x8d5/0x1120 kernel/fork.c:2985 __do_sys_unshare kernel/fork.c:3053 [inline] __se_sys_unshare+0x41/0x60 kernel/fork.c:3051 __x64_sys_unshare+0x32/0x50 kernel/fork.c:3051 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45c1d9 Code: Bad RIP value. RSP: 002b:00007f11e32d5c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000110 RAX: ffffffffffffffda RBX: 0000000000034280 RCX: 000000000045c1d9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000040000000 RBP: 000000000078bf30 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 0000000000c9fb6f R14: 00007f11e32d69c0 R15: 000000000078bf0c 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 sch_direct_xmit+0x580/0x1890 net/sched/sch_generic.c:314 qdisc_restart net/sched/sch_generic.c:377 [inline] __qdisc_run+0x155c/0x33a0 net/sched/sch_generic.c:385 qdisc_run include/net/pkt_sched.h:134 [inline] __dev_xmit_skb net/core/dev.c:3747 [inline] __dev_queue_xmit+0x23b7/0x3b20 net/core/dev.c:4100 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] ndisc_send_skb+0x1047/0x15a0 net/ipv6/ndisc.c:506 ndisc_send_rs+0xbd8/0xc30 net/ipv6/ndisc.c:700 addrconf_rs_timer+0x62f/0xcf0 net/ipv6/addrconf.c:3848 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 sch_direct_xmit+0x580/0x1890 net/sched/sch_generic.c:314 qdisc_restart net/sched/sch_generic.c:377 [inline] __qdisc_run+0x155c/0x33a0 net/sched/sch_generic.c:385 qdisc_run include/net/pkt_sched.h:134 [inline] __dev_xmit_skb net/core/dev.c:3747 [inline] __dev_queue_xmit+0x23b7/0x3b20 net/core/dev.c:4100 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] ndisc_send_skb+0x1047/0x15a0 net/ipv6/ndisc.c:506 ndisc_send_rs+0xbd8/0xc30 net/ipv6/ndisc.c:700 addrconf_rs_timer+0x62f/0xcf0 net/ipv6/addrconf.c:3848 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 =====================================================