binder: 30499:30503 transaction failed 29189/-3, size 0-0 line 2903 binder_alloc: 30499: binder_alloc_buf, no vma binder: 30499:30503 transaction failed 29189/-3, size 24-0 line 2903 ================================================================== BUG: KASAN: use-after-free in perf_trace_lock_acquire+0x5b7/0x980 include/trace/events/lock.h:13 Read of size 8 at addr ffff8801cf278848 by task syz-executor6/30499 CPU: 0 PID: 30499 Comm: syz-executor6 Not tainted 4.15.0-rc6+ #247 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+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 perf_trace_lock_acquire+0x5b7/0x980 include/trace/events/lock.h:13 trace_lock_acquire include/trace/events/lock.h:13 [inline] lock_acquire+0x394/0x580 kernel/locking/lockdep.c:3913 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 remove_wait_queue+0x81/0x350 kernel/sched/wait.c:50 ep_remove_wait_queue fs/eventpoll.c:595 [inline] ep_unregister_pollwait.isra.7+0x18c/0x590 fs/eventpoll.c:613 ep_free+0x13f/0x320 fs/eventpoll.c:830 ep_eventpoll_release+0x44/0x60 fs/eventpoll.c:862 __fput+0x327/0x7e0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9bb/0x1ad0 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 SYSC_exit_group kernel/exit.c:979 [inline] SyS_exit_group+0x1d/0x20 kernel/exit.c:977 entry_SYSCALL_64_fastpath+0x23/0x9a RIP: 0033:0x452ac9 RSP: 002b:0000000000a2fa08 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 000000000071bec8 RCX: 0000000000452ac9 RDX: 0000000000000000 RSI: 00000000007218a8 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000d77 R10: 000000000000000c R11: 0000000000000202 R12: 0000000000a2f9b0 R13: 000000000071bea0 R14: 000000000000016d R15: 000000000000000c Allocated by task 30503: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3610 kmalloc include/linux/slab.h:499 [inline] kzalloc include/linux/slab.h:688 [inline] binder_get_thread+0x1cf/0x870 drivers/android/binder.c:4219 binder_poll+0x8c/0x390 drivers/android/binder.c:4321 ep_item_poll.isra.10+0xec/0x320 fs/eventpoll.c:884 ep_insert+0x6a3/0x1b10 fs/eventpoll.c:1455 SYSC_epoll_ctl fs/eventpoll.c:2106 [inline] SyS_epoll_ctl+0x12e4/0x1ab0 fs/eventpoll.c:1992 entry_SYSCALL_64_fastpath+0x23/0x9a Freed by task 30503: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3488 [inline] kfree+0xd6/0x260 mm/slab.c:3803 binder_free_thread drivers/android/binder.c:4246 [inline] binder_thread_dec_tmpref+0x27f/0x310 drivers/android/binder.c:1821 binder_thread_release+0x27d/0x540 drivers/android/binder.c:4310 binder_ioctl+0xc02/0x1417 drivers/android/binder.c:4527 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x23/0x9a The buggy address belongs to the object at ffff8801cf278780 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 200 bytes inside of 512-byte region [ffff8801cf278780, ffff8801cf278980) The buggy address belongs to the page: page:000000004d0f884d count:1 mapcount:0 mapping:000000000db0b807 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801cf278000 0000000000000000 0000000100000006 raw: ffffea0007444220 ffffea0007373e20 ffff8801dac00940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cf278700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801cf278780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801cf278800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cf278880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cf278900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================