IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready ===================================== WARNING: bad unlock balance detected! 4.19.171-syzkaller #0 Not tainted ------------------------------------- syz-executor.0/8426 is trying to release lock (&file->mut) at: [] ucma_destroy_id+0x221/0x4a0 drivers/infiniband/core/ucma.c:631 but there are no more locks to release! other info that might help us debug this: 1 lock held by syz-executor.0/8426: #0: 00000000605fed5e (&file->mut){+.+.}, at: ucma_destroy_id+0x1c2/0x4a0 drivers/infiniband/core/ucma.c:629 stack backtrace: CPU: 1 PID: 8426 Comm: syz-executor.0 Not tainted 4.19.171-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+0x1fc/0x2ef lib/dump_stack.c:118 print_unlock_imbalance_bug kernel/locking/lockdep.c:149 [inline] __lock_release kernel/locking/lockdep.c:3678 [inline] lock_release.cold+0xe/0x4a kernel/locking/lockdep.c:3926 __mutex_unlock_slowpath+0x89/0x610 kernel/locking/mutex.c:1197 ucma_destroy_id+0x221/0x4a0 drivers/infiniband/core/ucma.c:631 ucma_write+0x288/0x350 drivers/infiniband/core/ucma.c:1738 __vfs_write+0xf7/0x770 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45e219 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8d4394ec68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045e219 RDX: 0000000000000018 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000119c068 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c034 R13: 00007ffc93ddf79f R14: 00007f8d4394f9c0 R15: 000000000119c034 ================================================================== BUG: KASAN: use-after-free in atomic64_read include/asm-generic/atomic-instrumented.h:27 [inline] BUG: KASAN: use-after-free in atomic_long_read include/asm-generic/atomic-long.h:47 [inline] BUG: KASAN: use-after-free in __mutex_unlock_slowpath+0x96/0x610 kernel/locking/mutex.c:1206 Read of size 8 at addr ffff8880aaa80000 by task syz-executor.0/8426 CPU: 1 PID: 8426 Comm: syz-executor.0 Not tainted 4.19.171-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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report+0x8f/0xa0 mm/kasan/report.c:412 atomic64_read include/asm-generic/atomic-instrumented.h:27 [inline] atomic_long_read include/asm-generic/atomic-long.h:47 [inline] __mutex_unlock_slowpath+0x96/0x610 kernel/locking/mutex.c:1206 ucma_destroy_id+0x221/0x4a0 drivers/infiniband/core/ucma.c:631 ucma_write+0x288/0x350 drivers/infiniband/core/ucma.c:1738 __vfs_write+0xf7/0x770 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45e219 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8d4394ec68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045e219 RDX: 0000000000000018 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000119c068 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c034 R13: 00007ffc93ddf79f R14: 00007f8d4394f9c0 R15: 000000000119c034 Allocated by task 8422: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] ucma_open+0x4a/0x280 drivers/infiniband/core/ucma.c:1770 misc_open+0x372/0x4a0 drivers/char/misc.c:141 chrdev_open+0x266/0x770 fs/char_dev.c:423 do_dentry_open+0x4aa/0x1160 fs/open.c:796 do_last fs/namei.c:3421 [inline] path_openat+0x793/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8421: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 ucma_close+0x2cf/0x360 drivers/infiniband/core/ucma.c:1829 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880aaa80000 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes inside of 256-byte region [ffff8880aaa80000, ffff8880aaa80100) The buggy address belongs to the page: page:ffffea0002aaa000 count:1 mapcount:0 mapping:ffff88813bff07c0 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002d38d88 ffff88813bff1648 ffff88813bff07c0 raw: 0000000000000000 ffff8880aaa80000 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aaa7ff00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ffff8880aaa7ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880aaa80000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880aaa80080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880aaa80100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================