===================================================== 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: 13668 Comm: syz-executor.0 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_transmit_skb net/ipv4/tcp_output.c:1256 [inline] tcp_write_xmit+0x30b1/0xb430 net/ipv4/tcp_output.c:2519 __tcp_push_pending_frames+0x124/0x4e0 net/ipv4/tcp_output.c:2694 tcp_send_fin+0x131e/0x1570 net/ipv4/tcp_output.c:3251 tcp_close+0x10f8/0x18b0 net/ipv4/tcp.c:2492 inet_release+0x1f7/0x270 net/ipv4/af_inet.c:428 inet6_release+0xaf/0x100 net/ipv6/af_inet6.c:475 __sock_release net/socket.c:605 [inline] sock_close+0x156/0x460 net/socket.c:1278 __fput+0x4ae/0xb80 fs/file_table.c:281 ____fput+0x37/0x40 fs/file_table.c:314 task_work_run+0x1ee/0x2d0 kernel/task_work.c:135 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:240 [inline] __prepare_exit_to_usermode+0x422/0x4d0 arch/x86/entry/common.c:270 __syscall_return_slowpath+0x89/0x5b0 arch/x86/entry/common.c:353 do_syscall_64+0xd6/0x150 arch/x86/entry/common.c:395 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x415d51 Code: Bad RIP value. RSP: 002b:0000000000c9fbe0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000415d51 RDX: 0000000000000000 RSI: 0000000000000065 RDI: 0000000000000003 RBP: 0000000000000001 R08: 000000003314e065 R09: 000000003314e069 R10: 0000000000c9fcd0 R11: 0000000000000293 R12: 000000000078c900 R13: 000000000078c900 R14: ffffffffffffffff R15: 000000000078bfac 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_transmit_skb net/ipv4/tcp_output.c:1256 [inline] tcp_write_xmit+0x30b1/0xb430 net/ipv4/tcp_output.c:2519 __tcp_push_pending_frames+0x124/0x4e0 net/ipv4/tcp_output.c:2694 tcp_send_fin+0x131e/0x1570 net/ipv4/tcp_output.c:3251 tcp_close+0x10f8/0x18b0 net/ipv4/tcp.c:2492 inet_release+0x1f7/0x270 net/ipv4/af_inet.c:428 inet6_release+0xaf/0x100 net/ipv6/af_inet6.c:475 __sock_release net/socket.c:605 [inline] sock_close+0x156/0x460 net/socket.c:1278 __fput+0x4ae/0xb80 fs/file_table.c:281 ____fput+0x37/0x40 fs/file_table.c:314 task_work_run+0x1ee/0x2d0 kernel/task_work.c:135 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:240 [inline] __prepare_exit_to_usermode+0x422/0x4d0 arch/x86/entry/common.c:270 __syscall_return_slowpath+0x89/0x5b0 arch/x86/entry/common.c:353 do_syscall_64+0xd6/0x150 arch/x86/entry/common.c:395 entry_SYSCALL_64_after_hwframe+0x44/0xa9 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_transmit_skb net/ipv4/tcp_output.c:1256 [inline] tcp_write_xmit+0x30b1/0xb430 net/ipv4/tcp_output.c:2519 __tcp_push_pending_frames+0x124/0x4e0 net/ipv4/tcp_output.c:2694 tcp_send_fin+0x131e/0x1570 net/ipv4/tcp_output.c:3251 tcp_close+0x10f8/0x18b0 net/ipv4/tcp.c:2492 inet_release+0x1f7/0x270 net/ipv4/af_inet.c:428 inet6_release+0xaf/0x100 net/ipv6/af_inet6.c:475 __sock_release net/socket.c:605 [inline] sock_close+0x156/0x460 net/socket.c:1278 __fput+0x4ae/0xb80 fs/file_table.c:281 ____fput+0x37/0x40 fs/file_table.c:314 task_work_run+0x1ee/0x2d0 kernel/task_work.c:135 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:240 [inline] __prepare_exit_to_usermode+0x422/0x4d0 arch/x86/entry/common.c:270 __syscall_return_slowpath+0x89/0x5b0 arch/x86/entry/common.c:353 do_syscall_64+0xd6/0x150 arch/x86/entry/common.c:395 entry_SYSCALL_64_after_hwframe+0x44/0xa9 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 =====================================================