syzbot


KMSAN: uninit-value in br_nf_forward_arp

Status: fixed on 2018/07/17 16:09
Subsystems: bridge netfilter
[Documentation on labels]
Fix commit: b84bbaf7a6c8 packet: in packet_snd start writing at link layer allocation
First crash: 2328d, last: 2328d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in br_nf_forward_arp (3) bridge netfilter 2 1781d 1773d 15/28 fixed on 2020/02/14 01:19
upstream KMSAN: uninit-value in br_nf_forward_arp (2) bridge netfilter C 5 1870d 1839d 0/28 closed as invalid on 2019/10/03 00:18

Sample crash report:
IPVS: length: 143 != 24
IPVS: length: 143 != 24
==================================================================
BUG: KMSAN: uninit-value in br_nf_forward_arp+0x96d/0xe90 net/bridge/br_netfilter_hooks.c:647
CPU: 0 PID: 8033 Comm: syz-executor3 Not tainted 4.17.0-rc5+ #103
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x185/0x1d0 lib/dump_stack.c:113
 kmsan_report+0x149/0x260 mm/kmsan/kmsan.c:1084
 __msan_warning_32+0x6e/0xc0 mm/kmsan/kmsan_instr.c:686
 br_nf_forward_arp+0x96d/0xe90 net/bridge/br_netfilter_hooks.c:647
 nf_hook_entry_hookfn include/linux/netfilter.h:120 [inline]
 nf_hook_slow+0x158/0x3d0 net/netfilter/core.c:483
 nf_hook include/linux/netfilter.h:243 [inline]
 NF_HOOK include/linux/netfilter.h:286 [inline]
 __br_forward+0x977/0xe00 net/bridge/br_forward.c:112
 br_flood+0xf5f/0x1060 net/bridge/br_forward.c:225
 br_handle_frame_finish+0x18ad/0x1a50 net/bridge/br_input.c:168
 NF_HOOK include/linux/netfilter.h:288 [inline]
 br_handle_frame+0xe4c/0x1d70 net/bridge/br_input.c:302
 __netif_receive_skb_core+0x2671/0x4ac0 net/core/dev.c:4546
 __netif_receive_skb net/core/dev.c:4657 [inline]
 process_backlog+0x62d/0xe20 net/core/dev.c:5337
 napi_poll net/core/dev.c:5735 [inline]
 net_rx_action+0x7c1/0x1a70 net/core/dev.c:5801
raw_sendmsg: syz-executor4 forgot to set AF_INET. Fix it!
 __do_softirq+0x56d/0x93d kernel/softirq.c:285
 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1046
 </IRQ>
 do_softirq kernel/softirq.c:329 [inline]
 __local_bh_enable_ip+0x114/0x140 kernel/softirq.c:182
 local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32
 rcu_read_unlock_bh include/linux/rcupdate.h:728 [inline]
 __dev_queue_xmit+0x3362/0x3510 net/core/dev.c:3611
 dev_queue_xmit+0x4b/0x60 net/core/dev.c:3617
 packet_snd net/packet/af_packet.c:2951 [inline]
 packet_sendmsg+0x7d62/0x8ab0 net/packet/af_packet.c:2976
 sock_sendmsg_nosec net/socket.c:629 [inline]
 sock_sendmsg net/socket.c:639 [inline]
 __sys_sendto+0x6c0/0x7e0 net/socket.c:1789
 __do_sys_sendto net/socket.c:1801 [inline]
 __se_sys_sendto net/socket.c:1797 [inline]
 __x64_sys_sendto+0x1a1/0x210 net/socket.c:1797
 do_syscall_64+0x152/0x230 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x455a09
RSP: 002b:00007f26e713cc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f26e713d6d4 RCX: 0000000000455a09
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000013
RBP: 000000000072bea0 R08: 00000000200001c0 R09: 0000000000000014
R10: 0000000000000001 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000005db R14: 00000000006fdd28 R15: 0000000000000000

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:279 [inline]
 kmsan_internal_poison_shadow+0xb8/0x1b0 mm/kmsan/kmsan.c:189
 kmsan_kmalloc+0x94/0x100 mm/kmsan/kmsan.c:315
 kmsan_slab_alloc+0x10/0x20 mm/kmsan/kmsan.c:322
 slab_post_alloc_hook mm/slab.h:446 [inline]
 slab_alloc_node mm/slub.c:2753 [inline]
 __kmalloc_node_track_caller+0xb32/0x11b0 mm/slub.c:4395
 __kmalloc_reserve net/core/skbuff.c:138 [inline]
 __alloc_skb+0x2cb/0x9e0 net/core/skbuff.c:206
 alloc_skb include/linux/skbuff.h:988 [inline]
 alloc_skb_with_frags+0x1e6/0xb80 net/core/skbuff.c:5254
 sock_alloc_send_pskb+0xb56/0x1190 net/core/sock.c:2088
 packet_alloc_skb net/packet/af_packet.c:2810 [inline]
 packet_snd net/packet/af_packet.c:2901 [inline]
 packet_sendmsg+0x6584/0x8ab0 net/packet/af_packet.c:2976
 sock_sendmsg_nosec net/socket.c:629 [inline]
 sock_sendmsg net/socket.c:639 [inline]
 __sys_sendto+0x6c0/0x7e0 net/socket.c:1789
 __do_sys_sendto net/socket.c:1801 [inline]
 __se_sys_sendto net/socket.c:1797 [inline]
 __x64_sys_sendto+0x1a1/0x210 net/socket.c:1797
 do_syscall_64+0x152/0x230 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
==================================================================
IPVS: length: 143 != 24

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/06/01 07:10 https://github.com/google/kmsan.git master 8fc8ecd1c58a 2f93b54f .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.