===================================================== 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: 16406 Comm: syz-executor.5 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_save_cb include/linux/filter.h:691 [inline] bpf_prog_run_save_cb include/linux/filter.h:705 [inline] sk_filter_trim_cap+0x42a/0xcc0 net/core/filter.c:119 sk_filter include/linux/filter.h:831 [inline] unix_dgram_sendmsg+0x1987/0x3c30 net/unix/af_unix.c:1710 unix_seqpacket_sendmsg+0x26c/0x2e0 net/unix/af_unix.c:2063 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] sock_write_iter+0x707/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:0x45c1d9 Code: Bad RIP value. RSP: 002b:00007f2569928c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000036900 RCX: 000000000045c1d9 RDX: 0000000000000020 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000078bf40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 0000000000c9fb6f R14: 00007f25699299c0 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_save_cb include/linux/filter.h:691 [inline] bpf_prog_run_save_cb include/linux/filter.h:705 [inline] sk_filter_trim_cap+0x42a/0xcc0 net/core/filter.c:119 sk_filter include/linux/filter.h:831 [inline] unix_dgram_sendmsg+0x1987/0x3c30 net/unix/af_unix.c:1710 unix_seqpacket_sendmsg+0x26c/0x2e0 net/unix/af_unix.c:2063 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] sock_write_iter+0x707/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 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_save_cb include/linux/filter.h:691 [inline] bpf_prog_run_save_cb include/linux/filter.h:705 [inline] sk_filter_trim_cap+0x42a/0xcc0 net/core/filter.c:119 sk_filter include/linux/filter.h:831 [inline] unix_dgram_sendmsg+0x1987/0x3c30 net/unix/af_unix.c:1710 unix_seqpacket_sendmsg+0x26c/0x2e0 net/unix/af_unix.c:2063 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] sock_write_iter+0x707/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 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 =====================================================