syzbot


KMSAN: uninit-value in packet_rcv_fanout (2)

Status: closed as invalid on 2020/07/22 14:22
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 799d, last: 797d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in packet_rcv_fanout C 14 850d 851d 0/24 closed as invalid on 2020/05/28 10:23

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in packet_rcv_fanout+0x2442/0x25c0 net/packet/af_packet.c:1463
CPU: 1 PID: 8445 Comm: sshd 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
 packet_rcv_fanout+0x2442/0x25c0 net/packet/af_packet.c:1463
 deliver_skb net/core/dev.c:2247 [inline]
 dev_queue_xmit_nit+0x862/0x1280 net/core/dev.c:2317
 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]
 ip_finish_output2+0x1fd8/0x24a0 net/ipv4/ip_output.c:228
 __ip_finish_output+0xaa7/0xd80 net/ipv4/ip_output.c:306
 ip_finish_output+0x166/0x410 net/ipv4/ip_output.c:316
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip_output+0x593/0x680 net/ipv4/ip_output.c:430
 dst_output include/net/dst.h:443 [inline]
 ip_local_out net/ipv4/ip_output.c:125 [inline]
 __ip_queue_xmit+0x1b5c/0x21a0 net/ipv4/ip_output.c:530
 ip_queue_xmit+0xcc/0xf0 include/net/ip.h:237
 __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_push+0x6fa/0x8a0 net/ipv4/tcp.c:733
 tcp_sendmsg_locked+0x5d90/0x6d00 net/ipv4/tcp.c:1411
 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:0x7f87f521b970
Code: Bad RIP value.
RSP: 002b:00007ffe1cbf1f48 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000034 RCX: 00007f87f521b970
RDX: 0000000000000034 RSI: 0000559aab5f5d5c RDI: 0000000000000003
RBP: 0000559aab5e59a0 R08: 00007ffe1cbf9080 R09: 0000000000000070
R10: 000000000000008f R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe1cbf1fdf R14: 0000559aa9fb9be7 R15: 0000000000000003

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]
 fanout_demux_bpf net/packet/af_packet.c:1404 [inline]
 packet_rcv_fanout+0x51e/0x25c0 net/packet/af_packet.c:1456
 deliver_skb net/core/dev.c:2247 [inline]
 dev_queue_xmit_nit+0x862/0x1280 net/core/dev.c:2317
 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]
 ip_finish_output2+0x1fd8/0x24a0 net/ipv4/ip_output.c:228
 __ip_finish_output+0xaa7/0xd80 net/ipv4/ip_output.c:306
 ip_finish_output+0x166/0x410 net/ipv4/ip_output.c:316
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip_output+0x593/0x680 net/ipv4/ip_output.c:430
 dst_output include/net/dst.h:443 [inline]
 ip_local_out net/ipv4/ip_output.c:125 [inline]
 __ip_queue_xmit+0x1b5c/0x21a0 net/ipv4/ip_output.c:530
 ip_queue_xmit+0xcc/0xf0 include/net/ip.h:237
 __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_push+0x6fa/0x8a0 net/ipv4/tcp.c:733
 tcp_sendmsg_locked+0x5d90/0x6d00 net/ipv4/tcp.c:1411
 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

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 (11):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kmsan-gce 2020/07/20 04:12 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report syz C
ci-upstream-kmsan-gce 2020/07/20 09:52 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce 2020/07/18 10:16 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce 2020/07/18 04:01 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce 2020/07/18 01:39 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce 2020/07/17 18:14 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/19 19:43 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/19 10:25 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/18 05:42 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/17 20:32 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/17 19:34 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
* Struck through repros no longer work on HEAD.