syzbot


KMSAN: uninit-value in bpf_skb_get_nlattr

Status: closed as invalid on 2020/05/28 10:23
Subsystems: bpf net
[Documentation on labels]
First crash: 1965d, last: 1964d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in bpf_skb_get_nlattr (2) bpf net 7 C 45 1910d 1913d 0/29 closed as invalid on 2020/07/22 14:12

Sample crash report:
=====================================================
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: 8816 Comm: syz-executor213 Not tainted 5.7.0-rc4-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+0x1c9/0x220 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:545 [inline]
 __bpf_prog_run_save_cb include/linux/filter.h:693 [inline]
 bpf_prog_run_save_cb include/linux/filter.h:707 [inline]
 sk_filter_trim_cap+0x42a/0xcc0 net/core/filter.c:119
 sk_filter include/linux/filter.h:833 [inline]
 netlink_unicast+0x4b9/0x1100 net/netlink/af_netlink.c:1331
 netlink_ack+0x105c/0x11a0 net/netlink/af_netlink.c:2439
 netlink_rcv_skb+0x321/0x650 net/netlink/af_netlink.c:2475
 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5472
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x1246/0x14d0 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2362
 ___sys_sendmsg net/socket.c:2416 [inline]
 __sys_sendmsg+0x623/0x750 net/socket.c:2449
 __do_sys_sendmsg net/socket.c:2458 [inline]
 __se_sys_sendmsg+0x97/0xb0 net/socket.c:2456
 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2456
 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x440309
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd7b2f95f8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440309
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401b90
R13: 0000000000401c20 R14: 0000000000000000 R15: 0000000000000000

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:545 [inline]
 __bpf_prog_run_save_cb include/linux/filter.h:693 [inline]
 bpf_prog_run_save_cb include/linux/filter.h:707 [inline]
 sk_filter_trim_cap+0x42a/0xcc0 net/core/filter.c:119
 sk_filter include/linux/filter.h:833 [inline]
 netlink_unicast+0x4b9/0x1100 net/netlink/af_netlink.c:1331
 netlink_ack+0x105c/0x11a0 net/netlink/af_netlink.c:2439
 netlink_rcv_skb+0x321/0x650 net/netlink/af_netlink.c:2475
 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5472
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x1246/0x14d0 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2362
 ___sys_sendmsg net/socket.c:2416 [inline]
 __sys_sendmsg+0x623/0x750 net/socket.c:2449
 __do_sys_sendmsg net/socket.c:2458 [inline]
 __se_sys_sendmsg+0x97/0xb0 net/socket.c:2456
 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2456
 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:297
 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:545 [inline]
 __bpf_prog_run_save_cb include/linux/filter.h:693 [inline]
 bpf_prog_run_save_cb include/linux/filter.h:707 [inline]
 sk_filter_trim_cap+0x42a/0xcc0 net/core/filter.c:119
 sk_filter include/linux/filter.h:833 [inline]
 netlink_unicast+0x4b9/0x1100 net/netlink/af_netlink.c:1331
 netlink_ack+0x105c/0x11a0 net/netlink/af_netlink.c:2439
 netlink_rcv_skb+0x321/0x650 net/netlink/af_netlink.c:2475
 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5472
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x1246/0x14d0 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2362
 ___sys_sendmsg net/socket.c:2416 [inline]
 __sys_sendmsg+0x623/0x750 net/socket.c:2449
 __do_sys_sendmsg net/socket.c:2458 [inline]
 __se_sys_sendmsg+0x97/0xb0 net/socket.c:2456
 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2456
 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:297
 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
=====================================================

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/27 03:27 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report syz C ci-upstream-kmsan-gce
2020/05/27 18:41 https://github.com/google/kmsan.git master 8b611d82b66b ec153193 .config console log report ci-upstream-kmsan-gce
2020/05/27 17:21 https://github.com/google/kmsan.git master 8b611d82b66b ec153193 .config console log report ci-upstream-kmsan-gce
2020/05/27 16:23 https://github.com/google/kmsan.git master 8b611d82b66b ec153193 .config console log report ci-upstream-kmsan-gce
2020/05/26 22:11 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce
2020/05/26 21:40 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce
2020/05/26 21:28 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce
2020/05/26 21:27 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce
2020/05/26 21:18 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce
2020/05/26 21:01 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce
2020/05/26 20:13 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce
2020/05/26 19:53 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce
2020/05/27 18:45 https://github.com/google/kmsan.git master 8b611d82b66b ec153193 .config console log report ci-upstream-kmsan-gce-386
2020/05/27 18:36 https://github.com/google/kmsan.git master 8b611d82b66b ec153193 .config console log report ci-upstream-kmsan-gce-386
2020/05/27 17:24 https://github.com/google/kmsan.git master 8b611d82b66b ec153193 .config console log report ci-upstream-kmsan-gce-386
2020/05/27 16:23 https://github.com/google/kmsan.git master 8b611d82b66b ec153193 .config console log report ci-upstream-kmsan-gce-386
2020/05/27 14:01 https://github.com/google/kmsan.git master 8b611d82b66b ec153193 .config console log report ci-upstream-kmsan-gce-386
2020/05/27 08:09 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce-386
2020/05/27 04:52 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce-386
2020/05/27 00:52 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce-386
2020/05/26 23:07 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce-386
2020/05/26 22:41 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce-386
2020/05/26 21:48 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce-386
2020/05/26 20:53 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce-386
2020/05/26 20:09 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce-386
2020/05/26 19:44 https://github.com/google/kmsan.git master 94bc4cd0c2f0 9072c126 .config console log report ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.