binder: 7351:7352 transaction failed 29189/-22, size 0-12288 line 2855 ================================================================== BUG: KASAN: use-after-free in perf_trace_lock_acquire+0x66b/0x800 include/trace/events/lock.h:13 Read of size 8 at addr ffff8801c157f2d0 by task syz-executor1/7354 CPU: 0 PID: 7354 Comm: syz-executor1 Not tainted 4.19.0-rc3+ #134 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 binder: 7355:7360 transaction failed 29189/-22, size 0-12288 line 2855 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:3900 binder: 7358:7362 transaction failed 29189/-22, size 0-12288 line 2855 __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 binder: 7369:7370 transaction failed 29189/-22, size 0-12288 line 2855 __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_disconnect_claim+0x297/0x440 drivers/usb/core/devio.c:2281 usbdev_do_ioctl+0x17e3/0x3b50 drivers/usb/core/devio.c:2523 binder: 7376:7378 transaction failed 29189/-22, size 0-12288 line 2855 binder: 7371:7377 transaction failed 29189/-22, size 0-12288 line 2855 binder: 7383:7384 transaction failed 29189/-22, size 0-12288 line 2855 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 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f12ca9 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:00000000f5f0e0cc EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000008108551b RDX: 0000000020000100 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 CPU: 1 PID: 7373 Comm: syz-executor4 Not tainted 4.19.0-rc3+ #134 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Allocated by task 7331: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 Call Trace: 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 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c4/0x2b4 lib/dump_stack.c:113 kmalloc include/linux/slab.h:513 [inline] kzalloc include/linux/slab.h:707 [inline] usbdev_open+0xe4/0xa20 drivers/usb/core/devio.c:976 chrdev_open+0x25a/0x710 fs/char_dev.c:417 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_compat_sys_open fs/open.c:1100 [inline] __se_compat_sys_open fs/open.c:1098 [inline] __ia32_compat_sys_open+0x79/0xb0 fs/open.c:1098 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0xa/0x17 lib/fault-inject.c:149 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 Freed by task 7331: 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 usbdev_release+0x413/0x560 drivers/usb/core/devio.c:1059 __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 get_signal+0x155e/0x1980 kernel/signal.c:2343 do_signal+0x9c/0x21e0 arch/x86/kernel/signal.c:816 exit_to_usermode_loop+0x2e5/0x380 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:341 [inline] do_fast_syscall_32+0xcd5/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff8801c157f280 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 80 bytes inside of 512-byte region [ffff8801c157f280, ffff8801c157f480) The buggy address belongs to the page: page:ffffea0007055fc0 count:1 mapcount:0 mapping:ffff8801da800940 index:0xffff8801c157fc80 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0006fada88 ffffea0006ff02c8 ffff8801da800940 raw: ffff8801c157fc80 ffff8801c157f000 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c157f180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c157f200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801c157f280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c157f300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c157f380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================