================================================================== BUG: KASAN: use-after-free in perf_trace_lock_acquire+0x66b/0x800 include/trace/events/lock.h:13 Read of size 8 at addr ffff8801c2c3d090 by task syz-executor2/19815 CPU: 1 PID: 19815 Comm: syz-executor2 Not tainted 4.19.0-rc4+ #143 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+0x1c4/0x2b4 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 perf_trace_lock_acquire+0x66b/0x800 include/trace/events/lock.h:13 trace_lock_acquire include/trace/events/lock.h:13 [inline] lock_acquire+0x385/0x520 kernel/locking/lockdep.c:3899 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 destroy_async_on_interface+0x155/0x560 drivers/usb/core/devio.c:653 driver_disconnect+0xea/0x150 drivers/usb/core/devio.c:699 usb_unbind_interface+0x25a/0xbe0 drivers/usb/core/driver.c:423 __device_release_driver drivers/base/dd.c:966 [inline] device_release_driver_internal+0x651/0x750 drivers/base/dd.c:999 device_release_driver+0x19/0x20 drivers/base/dd.c:1024 usb_driver_release_interface+0x110/0x190 drivers/usb/core/driver.c:604 proc_ioctl+0x6f2/0x7e0 drivers/usb/core/devio.c:2150 proc_ioctl_compat drivers/usb/core/devio.c:2207 [inline] usbdev_do_ioctl+0x2222/0x3b50 drivers/usb/core/devio.c:2481 usbdev_compat_ioctl+0x24/0x30 drivers/usb/core/devio.c:2562 __do_compat_sys_ioctl fs/compat_ioctl.c:1419 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:1365 [inline] __ia32_compat_sys_ioctl+0x20e/0x630 fs/compat_ioctl.c:1365 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f07ca9 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 0c 24 c3 8b 1c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5f030cc EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000c00c5512 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 18285: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x750 mm/slab.c:3620 kmalloc include/linux/slab.h:513 [inline] kzalloc include/linux/slab.h:707 [inline] kernfs_fop_open+0x358/0xf90 fs/kernfs/file.c:648 do_dentry_open+0x499/0x1250 fs/open.c:771 vfs_open+0xa0/0xd0 fs/open.c:880 do_last fs/namei.c:3418 [inline] path_openat+0x12bf/0x5160 fs/namei.c:3534 do_filp_open+0x255/0x380 fs/namei.c:3564 do_sys_open+0x568/0x700 fs/open.c:1063 __do_sys_open fs/open.c:1081 [inline] __se_sys_open fs/open.c:1076 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1076 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 18285: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3813 kernfs_fop_release+0x12b/0x1a0 fs/kernfs/file.c:783 __fput+0x385/0xa30 fs/file_table.c:278 ____fput+0x15/0x20 fs/file_table.c:309 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801c2c3d040 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 80 bytes inside of 512-byte region [ffff8801c2c3d040, ffff8801c2c3d240) The buggy address belongs to the page: page:ffffea00070b0f40 count:1 mapcount:0 mapping:ffff8801da800940 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0007625e48 ffffea000738a348 ffff8801da800940 raw: 0000000000000000 ffff8801c2c3d040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c2c3cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c2c3d000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8801c2c3d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c2c3d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c2c3d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================