IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready 8021q: adding VLAN 0 to HW filter on device batadv0 IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready ===================================== WARNING: bad unlock balance detected! 4.14.131 #25 Not tainted ------------------------------------- syz-executor.0/7941 is trying to release lock (&file->mut) at: [] ucma_destroy_id+0x20d/0x420 drivers/infiniband/core/ucma.c:606 but there are no more locks to release! other info that might help us debug this: 1 lock held by syz-executor.0/7941: #0: (&file->mut){+.+.}, at: [] ucma_destroy_id+0x1aa/0x420 drivers/infiniband/core/ucma.c:604 stack backtrace: CPU: 1 PID: 7941 Comm: syz-executor.0 Not tainted 4.14.131 #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x138/0x19c lib/dump_stack.c:53 print_unlock_imbalance_bug kernel/locking/lockdep.c:3548 [inline] print_unlock_imbalance_bug.cold+0x114/0x123 kernel/locking/lockdep.c:3525 __lock_release kernel/locking/lockdep.c:3762 [inline] lock_release+0x616/0x940 kernel/locking/lockdep.c:4010 __mutex_unlock_slowpath+0x71/0x800 kernel/locking/mutex.c:1018 mutex_unlock+0xd/0x10 kernel/locking/mutex.c:614 ucma_destroy_id+0x20d/0x420 drivers/infiniband/core/ucma.c:606 ucma_write+0x231/0x310 drivers/infiniband/core/ucma.c:1672 __vfs_write+0x105/0x6b0 fs/read_write.c:480 vfs_write+0x198/0x500 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xfd/0x230 fs/read_write.c:582 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459519 RSP: 002b:00007f5ffff83c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459519 RDX: 0000000020000118 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5ffff846d4 R13: 00000000004d0138 R14: 00000000004e02c8 R15: 00000000ffffffff ================================================================== BUG: KASAN: use-after-free in ucma_destroy_id+0x3e2/0x420 drivers/infiniband/core/ucma.c:608 Read of size 8 at addr ffff888089d48128 by task syz-executor.0/7941 CPU: 1 PID: 7941 Comm: syz-executor.0 Not tainted 4.14.131 #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x138/0x19c lib/dump_stack.c:53 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 ucma_destroy_id+0x3e2/0x420 drivers/infiniband/core/ucma.c:608 ucma_write+0x231/0x310 drivers/infiniband/core/ucma.c:1672 __vfs_write+0x105/0x6b0 fs/read_write.c:480 vfs_write+0x198/0x500 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xfd/0x230 fs/read_write.c:582 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459519 RSP: 002b:00007f5ffff83c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459519 RDX: 0000000020000118 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5ffff846d4 R13: 00000000004d0138 R14: 00000000004e02c8 R15: 00000000ffffffff Allocated by task 7937: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x152/0x790 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] ucma_alloc_ctx+0x85/0x520 drivers/infiniband/core/ucma.c:192 ucma_create_id+0xed/0x5b0 drivers/infiniband/core/ucma.c:478 ucma_write+0x231/0x310 drivers/infiniband/core/ucma.c:1672 __vfs_write+0x105/0x6b0 fs/read_write.c:480 vfs_write+0x198/0x500 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xfd/0x230 fs/read_write.c:582 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 7936: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 ucma_free_ctx+0x73c/0xa30 drivers/infiniband/core/ucma.c:577 ucma_close+0x11d/0x310 drivers/infiniband/core/ucma.c:1758 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff888089d480c0 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 104 bytes inside of 256-byte region [ffff888089d480c0, ffff888089d481c0) The buggy address belongs to the page: page:ffffea0002275200 count:1 mapcount:0 mapping:ffff888089d480c0 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff888089d480c0 0000000000000000 000000010000000c raw: ffffea000228d2a0 ffffea0002a11820 ffff8880aa8007c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888089d48000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888089d48080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888089d48100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888089d48180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888089d48200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================