syzbot


WARNING: locking bug in finish_lock_switch

Status: closed as dup on 2021/01/20 04:57
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+91e3de3393c461e632ee@syzkaller.appspotmail.com
First crash: 1479d, last: 1395d
Cause bisection: introduced by (bisect log) [release commit]:
commit c470abd4fde40ea6a0846a2beab642a578c0b8cd
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Feb 19 22:34:00 2017 +0000

  Linux 4.10

Crash: KASAN: use-after-free Read in put_device (log)
Repro: syz .config
  
Fix bisection: failed (error log, bisect log)
  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
WARNING: locking bug in finish_task_switch bluetooth net C done inconclusive 131 415d 1526d
Discussions (1)
Title Replies (including bot) Last reply
WARNING: locking bug in finish_lock_switch 0 (2) 2020/04/10 21:52
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2020/05/17 13:06 0m bisect fix upstream error job log (0)
2020/04/01 14:36 20m bisect fix upstream job log (0) log

Sample crash report:
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(1)
WARNING: CPU: 0 PID: 17790 at kernel/locking/lockdep.c:183 hlock_class kernel/locking/lockdep.c:183 [inline]
WARNING: CPU: 0 PID: 17790 at kernel/locking/lockdep.c:183 check_wait_context kernel/locking/lockdep.c:4054 [inline]
WARNING: CPU: 0 PID: 17790 at kernel/locking/lockdep.c:183 __lock_acquire+0x8e4/0x2c30 kernel/locking/lockdep.c:4305
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 17790 Comm: syz-executor026 Not tainted 5.7.0-rc6-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+0x1e9/0x30e lib/dump_stack.c:118
 panic+0x264/0x7a0 kernel/panic.c:221
 __warn+0x209/0x210 kernel/panic.c:582
 report_bug+0x1ac/0x2d0 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:175 [inline]
 do_error_trap+0xca/0x1c0 arch/x86/kernel/traps.c:267
 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:286
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
RIP: 0010:hlock_class kernel/locking/lockdep.c:183 [inline]
RIP: 0010:check_wait_context kernel/locking/lockdep.c:4054 [inline]
RIP: 0010:__lock_acquire+0x8e4/0x2c30 kernel/locking/lockdep.c:4305
Code: 85 76 13 08 00 0f 85 bf fe ff ff 48 c7 c7 99 82 e5 88 48 c7 c6 d3 4f ea 88 31 c0 e8 46 e8 ec ff 48 ba 00 00 00 00 00 fc ff df <0f> 0b 31 db e9 bb fe ff ff 31 db e9 aa fe ff ff 48 c7 c1 b4 19 6c
RSP: 0018:ffffc9000cb7f790 EFLAGS: 00010046
RAX: b9db11971958b600 RBX: 000000000000060a RCX: ffff888093e9e580
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffffffff815cd136
RBP: ffffc9000cb7f8f8 R08: ffffffff817912a6 R09: fffffbfff125cd0b
R10: fffffbfff125cd0b R11: 0000000000000000 R12: 0000000000000004
R13: 1ffffffff16abda6 R14: ffff888093e9ee90 R15: 0000000000000001
 lock_acquire+0x169/0x480 kernel/locking/lockdep.c:4934
 finish_lock_switch+0x21/0x30 kernel/sched/core.c:3105
 finish_task_switch+0x24f/0x550 kernel/sched/core.c:3206
 context_switch kernel/sched/core.c:3370 [inline]
 __schedule+0x80d/0xc90 kernel/sched/core.c:4083
 preempt_schedule_irq+0xca/0x150 kernel/sched/core.c:4341
 retint_kernel+0x1b/0x2b
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:759 [inline]
RIP: 0010:lock_acquire+0x1c7/0x480 kernel/locking/lockdep.c:4937
Code: c1 e8 03 80 3c 10 00 74 0c 48 c7 c7 b0 b9 2b 89 e8 9e da 58 00 48 83 3d d6 23 d3 07 00 0f 84 8e 02 00 00 48 8b 7c 24 20 57 9d <0f> 1f 44 00 00 65 48 8b 04 25 28 00 00 00 48 3b 44 24 58 0f 85 70
RSP: 0018:ffffc9000cb7fba0 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff1257736 RBX: 1ffff110127d3dc8 RCX: dffffc0000000000
RDX: dffffc0000000000 RSI: ffffffff8ad74c30 RDI: 0000000000000282
RBP: 0000000000000000 R08: dffffc0000000000 R09: fffffbfff16ab3e4
R10: fffffbfff16ab3e4 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffff888093e9ee44 R15: ffff88808eb3f938
 flush_workqueue+0x125/0x15a0 kernel/workqueue.c:2779
 hci_dev_open+0x205/0x2d0 net/bluetooth/hci_core.c:1651
 hci_sock_bind+0x15ba/0x1aa0 net/bluetooth/hci_sock.c:1200
 __sys_bind+0x283/0x360 net/socket.c:1662
 __do_sys_bind net/socket.c:1673 [inline]
 __se_sys_bind net/socket.c:1671 [inline]
 __x64_sys_bind+0x76/0x80 net/socket.c:1671
 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x446849
Code: e8 0c e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 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 5b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f13d3492db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446849
RDX: 0000000000000006 RSI: 0000000020000140 RDI: 0000000000000004
RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c
R13: 00007ffc160398ff R14: 00007f13d34939c0 R15: 000000000000002d
Shutting down cpus with NMI
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/23 13:45 upstream 444565650a5f 9682898d .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/04/17 13:06 upstream 7a56db0299f9 18397578 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/04/10 21:51 upstream c0cc271173b2 a8c6a3f8 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/02/29 12:54 upstream f8788d86ab28 59b57593 .config console log report syz ci-upstream-kasan-gce-smack-root
2020/03/02 14:30 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.