syzbot


WARNING: bad unlock balance detected! (3)

Status: auto-obsoleted due to no activity on 2022/09/26 08:14
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+f3e3434787332dfc1c47@syzkaller.appspotmail.com
First crash: 1854d, last: 1249d
Cause bisection: introduced by (bisect log) :
commit ec01fb69ac8034ad6e839b31f9df167a110f868b
Author: Jerome Brunet <jbrunet@baylibre.com>
Date: Wed Jan 16 17:59:47 2019 +0000

  arm64: dts: meson: s400: fix emmc maximum rate

Crash: BUG: unable to handle kernel paging request in free_block (log)
Repro: syz .config
  
Fix bisection: fixed by (bisect log) [no-op commit]:
commit 0b1eddc1964351cd5ce57aff46853ed4ce9ebbff
Author: Michal Kalderon <michal.kalderon@marvell.com>
Date: Wed Sep 2 16:57:35 2020 +0000

  RDMA/qedr: Fix doorbell setting

  
Discussions (3)
Title Replies (including bot) Last reply
Reminder: 99 open syzbot bugs in net subsystem 14 (14) 2019/07/31 15:13
Reminder: 94 open syzbot bugs in net subsystem 1 (1) 2019/06/25 05:48
WARNING: bad unlock balance detected! (3) 2 (4) 2019/03/26 08:30
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: bad unlock balance detected! net 1 2289d 2285d 0/26 closed as invalid on 2018/01/30 23:45
upstream WARNING: bad unlock balance detected! (2) net syz 1 1867d 1867d 0/26 closed as invalid on 2019/02/06 08:32
Last patch testing requests (6)
Created Duration User Patch Repo Result
2022/09/26 06:30 16m retest repro linux-next OK log
2022/09/25 10:30 15m retest repro upstream OK log
2022/09/22 19:29 16m retest repro upstream OK log
2022/09/21 06:29 17m retest repro upstream OK log
2022/09/09 22:27 15m retest repro net-old OK log
2022/09/08 09:27 16m retest repro upstream OK log
Fix bisection attempts (12)
Created Duration User Patch Repo Result
2020/11/15 12:30 3h51m bisect fix upstream job log (1)
2020/10/16 11:59 27m bisect fix upstream job log (0) log
2020/09/16 09:59 25m bisect fix upstream job log (0) log
2020/08/15 05:48 25m bisect fix upstream job log (0) log
2020/05/29 14:19 26m bisect fix upstream job log (0) log
2020/04/29 13:37 30m bisect fix upstream job log (0) log
2020/03/30 12:42 30m bisect fix upstream job log (0) log
2020/01/27 20:31 26m bisect fix upstream job log (0) log
2019/12/18 09:19 25m bisect fix upstream job log (0) log
2019/10/27 12:03 26m bisect fix upstream job log (0) log
2019/09/27 11:36 26m bisect fix upstream job log (0) log
2019/08/19 06:05 26m bisect fix upstream job log (0) log

Sample crash report:
=====================================
WARNING: bad unlock balance detected!
5.6.0-rc3-syzkaller #0 Not tainted
-------------------------------------
syz-executor.0/11452 is trying to release lock (
==================================================================
BUG: KASAN: use-after-free in print_unlock_imbalance_bug kernel/locking/lockdep.c:3999 [inline]
BUG: KASAN: use-after-free in print_unlock_imbalance_bug.cold+0x97/0x123 kernel/locking/lockdep.c:3983
Read of size 8 at addr ffff88809d32ca60 by task syz-executor.0/11452

CPU: 0 PID: 11452 Comm: syz-executor.0 Not tainted 5.6.0-rc3-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+0x197/0x210 lib/dump_stack.c:118
 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506
 kasan_report+0x12/0x20 mm/kasan/common.c:641
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135
 print_unlock_imbalance_bug kernel/locking/lockdep.c:3999 [inline]
 print_unlock_imbalance_bug.cold+0x97/0x123 kernel/locking/lockdep.c:3983
 __lock_release kernel/locking/lockdep.c:4241 [inline]
 lock_release+0x5f2/0x960 kernel/locking/lockdep.c:4502
 __mutex_unlock_slowpath+0x86/0x6a0 kernel/locking/mutex.c:1228
 mutex_unlock+0xd/0x10 kernel/locking/mutex.c:740
 ucma_destroy_id+0x24a/0x490 drivers/infiniband/core/ucma.c:621
 ucma_write+0x2d7/0x3c0 drivers/infiniband/core/ucma.c:1684
 __vfs_write+0x8a/0x110 fs/read_write.c:494
 vfs_write+0x268/0x5d0 fs/read_write.c:558
 ksys_write+0x220/0x290 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x73/0xb0 fs/read_write.c:620
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45c449
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f36a9ea4c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f36a9ea56d4 RCX: 000000000045c449
RDX: 0000000000000018 RSI: 0000000020000200 RDI: 0000000000000006
RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000cb7 R14: 00000000004d7b10 R15: 000000000076bf2c

Allocated by task 11457:
 save_stack+0x23/0x90 mm/kasan/common.c:72
 set_track mm/kasan/common.c:80 [inline]
 __kasan_kmalloc mm/kasan/common.c:515 [inline]
 __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488
 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529
 kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3551
 kmalloc include/linux/slab.h:555 [inline]
 ucma_open+0x4f/0x290 drivers/infiniband/core/ucma.c:1716
 misc_open+0x395/0x4c0 drivers/char/misc.c:141
 chrdev_open+0x245/0x6b0 fs/char_dev.c:414
 do_dentry_open+0x4e6/0x1380 fs/open.c:797
 vfs_open+0xa0/0xd0 fs/open.c:914
 do_last fs/namei.c:3490 [inline]
 path_openat+0x12ee/0x3490 fs/namei.c:3607
 do_filp_open+0x192/0x260 fs/namei.c:3637
 do_sys_openat2+0x5eb/0x7e0 fs/open.c:1149
 do_sys_open+0xf2/0x180 fs/open.c:1165
 __do_sys_openat fs/open.c:1179 [inline]
 __se_sys_openat fs/open.c:1174 [inline]
 __x64_sys_openat+0x9d/0x100 fs/open.c:1174
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 11451:
 save_stack+0x23/0x90 mm/kasan/common.c:72
 set_track mm/kasan/common.c:80 [inline]
 kasan_set_free_info mm/kasan/common.c:337 [inline]
 __kasan_slab_free+0x102/0x150 mm/kasan/common.c:476
 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485
 __cache_free mm/slab.c:3426 [inline]
 kfree+0x10a/0x2c0 mm/slab.c:3757
 ucma_close+0x275/0x310 drivers/infiniband/core/ucma.c:1772
 __fput+0x2ff/0x890 fs/file_table.c:280
 ____fput+0x16/0x20 fs/file_table.c:313
 task_work_run+0x145/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:278 [inline]
 do_syscall_64+0x676/0x790 arch/x86/entry/common.c:304
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff88809d32ca00
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 96 bytes inside of
 256-byte region [ffff88809d32ca00, ffff88809d32cb00)
The buggy address belongs to the page:
page:ffffea000274cb00 refcount:1 mapcount:0 mapping:ffff8880aa4008c0 index:0x0
flags: 0xfffe0000000200(slab)
raw: 00fffe0000000200 ffffea00025e7e88 ffffea0002671d88 ffff8880aa4008c0
raw: 0000000000000000 ffff88809d32c000 0000000100000008 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88809d32c900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88809d32c980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88809d32ca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                       ^
 ffff88809d32ca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88809d32cb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/29 03:49 upstream f8788d86ab28 59b57593 .config console log report syz ci-upstream-kasan-gce-root
2020/02/27 06:32 upstream f8788d86ab28 59b57593 .config console log report syz ci-upstream-kasan-gce-smack-root
2019/03/10 22:04 upstream 065b6c4c913d 12365b99 .config console log report syz ci-upstream-kasan-gce-selinux-root
2019/02/20 06:00 upstream 40e196a906d9 4df543c9 .config console log report syz ci-upstream-kasan-gce-386
2019/03/26 11:36 net-old 27602e2c44da 55684ce1 .config console log report syz ci-upstream-net-this-kasan-gce
2019/03/02 21:24 linux-next c63e9e91a254 1c0e457a .config console log report syz ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.