syzbot


WARNING: locking bug in rhashtable_walk_enter

Status: upstream: reported C repro on 2019/05/18 07:28
Reported-by: syzbot+6440134c13554d3abfb0@syzkaller.appspotmail.com
First crash: 1178d, last: 1173d

Cause bisection: introduced by (bisect log) :
commit 7e27e8d6130c5e88fac9ddec4249f7f2337fe7f8
Author: Junwei Hu <hujunwei4@huawei.com>
Date: Thu May 16 02:51:15 2019 +0000

  tipc: switch order of device registration to fix a crash

Crash: KASAN: slab-out-of-bounds Read in rhashtable_walk_enter (log)
Repro: C syz .config

Fix bisection: failed (bisect log)

Sample crash report:
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(class_idx > MAX_LOCKDEP_KEYS)
WARNING: CPU: 1 PID: 9018 at kernel/locking/lockdep.c:3764 __lock_acquire+0x17b5/0x5490 kernel/locking/lockdep.c:3764
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 9018 Comm: syz-executor070 Not tainted 5.2.0-rc1+ #21
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+0x172/0x1f0 lib/dump_stack.c:113
 panic+0x2cb/0x744 kernel/panic.c:218
 __warn.cold+0x20/0x4d kernel/panic.c:575
 report_bug+0x263/0x2b0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:179 [inline]
 fixup_bug arch/x86/kernel/traps.c:174 [inline]
 do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:272
 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:291
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:986
RIP: 0010:__lock_acquire+0x17b5/0x5490 kernel/locking/lockdep.c:3764
Code: d2 0f 85 c7 2c 00 00 44 8b 3d a7 a0 29 08 45 85 ff 0f 85 57 f3 ff ff 48 c7 c6 20 c1 6b 87 48 c7 c7 00 98 6b 87 e8 09 d5 eb ff <0f> 0b e9 40 f3 ff ff 0f 0b e9 83 f1 ff ff 8b 0d 47 88 0e 09 85 c9
RSP: 0018:ffff8880973473e0 EFLAGS: 00010086
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ac7e6 RDI: ffffed1012e68e6e
RBP: ffff888097347588 R08: ffff88809f3626c0 R09: fffffbfff11730e9
R10: fffffbfff11730e8 R11: ffffffff88b98743 R12: 000000003034ef48
R13: 0000000000000000 R14: 0000000000040f48 R15: 0000000000000000
 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4302
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151
 spin_lock include/linux/spinlock.h:338 [inline]
 rhashtable_walk_enter+0xf9/0x390 lib/rhashtable.c:669
 __tipc_dump_start+0x1fa/0x3c0 net/tipc/socket.c:3414
 tipc_dump_start+0x70/0x90 net/tipc/socket.c:3396
 __netlink_dump_start+0x4f8/0x7d0 net/netlink/af_netlink.c:2351
 netlink_dump_start include/linux/netlink.h:226 [inline]
 tipc_sock_diag_handler_dump+0x1d9/0x270 net/tipc/diag.c:91
 __sock_diag_cmd net/core/sock_diag.c:232 [inline]
 sock_diag_rcv_msg+0x319/0x410 net/core/sock_diag.c:263
 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2486
 sock_diag_rcv+0x2b/0x40 net/core/sock_diag.c:274
 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
 netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1337
 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1926
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xd7/0x130 net/socket.c:671
 ___sys_sendmsg+0x803/0x920 net/socket.c:2292
 __sys_sendmsg+0x105/0x1d0 net/socket.c:2330
 __do_sys_sendmsg net/socket.c:2339 [inline]
 __se_sys_sendmsg net/socket.c:2337 [inline]
 __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2337
 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440209
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:00007ffce930a5a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440209
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a90
R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (40):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2019/05/21 22:05 upstream 5bdd9ad875b6 13427bd9 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2019/05/21 05:49 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-root 2019/05/21 05:37 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-selinux-root 2019/05/21 05:13 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-root 2019/05/21 04:06 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-selinux-root 2019/05/21 03:37 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-root 2019/05/21 03:33 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-selinux-root 2019/05/21 03:03 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-smack-root 2019/05/20 22:00 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-386 2019/05/21 03:03 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-386 2019/05/21 02:28 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-386 2019/05/21 00:28 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-386 2019/05/21 00:07 upstream f49aa1de9836 8285069f .config log report syz C
ci-upstream-net-this-kasan-gce 2019/05/20 23:54 net f49aa1de9836 8285069f .config log report syz C
ci-upstream-bpf-kasan-gce 2019/05/20 22:25 bpf 6a0a923dfa14 8285069f .config log report syz C
ci-upstream-net-this-kasan-gce 2019/05/20 21:34 net f49aa1de9836 8285069f .config log report syz C
ci-upstream-bpf-kasan-gce 2019/05/20 21:10 bpf 6a0a923dfa14 8285069f .config log report syz C
ci-upstream-bpf-kasan-gce 2019/05/20 20:49 bpf 6a0a923dfa14 8285069f .config log report syz C
ci-upstream-net-this-kasan-gce 2019/05/17 01:42 net 510e2ceda031 7fb690f3 .config log report syz C
ci-upstream-net-this-kasan-gce 2019/05/17 01:00 net 510e2ceda031 7fb690f3 .config log report syz C
ci-upstream-net-kasan-gce 2019/05/20 23:28 net-next f49aa1de9836 8285069f .config log report syz C
ci-upstream-net-kasan-gce 2019/05/20 21:14 net-next f49aa1de9836 8285069f .config log report syz C
ci-upstream-kasan-gce-root 2019/05/21 18:36 upstream 5bdd9ad875b6 13427bd9 .config log report
ci-upstream-kasan-gce 2019/05/20 21:44 upstream f49aa1de9836 8285069f .config log report
ci-upstream-kasan-gce-selinux-root 2019/05/20 21:23 upstream f49aa1de9836 8285069f .config log report
ci-upstream-kasan-gce 2019/05/20 20:20 upstream f49aa1de9836 8285069f .config log report
ci-upstream-kasan-gce-smack-root 2019/05/20 19:57 upstream f49aa1de9836 8285069f .config log report
ci-upstream-kasan-gce-selinux-root 2019/05/20 19:35 upstream f49aa1de9836 8285069f .config log report
ci-upstream-kasan-gce-386 2019/05/21 17:57 upstream 5bdd9ad875b6 13427bd9 .config log report
ci-upstream-net-this-kasan-gce 2019/05/20 23:42 net f49aa1de9836 8285069f .config log report
ci-upstream-net-this-kasan-gce 2019/05/19 22:06 net 5a35c8ea7c40 5a4461b0 .config log report
ci-upstream-net-this-kasan-gce 2019/05/17 13:45 net 510e2ceda031 95dfd515 .config log report
ci-upstream-net-this-kasan-gce 2019/05/16 23:58 net 510e2ceda031 7fb690f3 .config log report
ci-upstream-bpf-next-kasan-gce 2019/05/22 03:57 bpf-next f49aa1de9836 13427bd9 .config log report
ci-upstream-net-kasan-gce 2019/05/21 18:03 net-next f49aa1de9836 13427bd9 .config log report
ci-upstream-net-kasan-gce 2019/05/21 17:57 net-next f49aa1de9836 13427bd9 .config log report
ci-upstream-net-kasan-gce 2019/05/21 17:57 net-next f49aa1de9836 13427bd9 .config log report
ci-upstream-net-kasan-gce 2019/05/20 18:39 net-next f49aa1de9836 8285069f .config log report
ci-upstream-linux-next-kasan-gce-root 2019/05/17 15:14 linux-next b1d6682ef9bb 95dfd515 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/05/17 05:38 linux-next b1d6682ef9bb 7fb690f3 .config log report