================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 Read of size 8 at addr ffff8801cd7a0fb8 by task syzkaller229858/3319 CPU: 0 PID: 3319 Comm: syzkaller229858 Not tainted 4.9.78-g68d447c #32 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c938f870 ffffffff81d943a9 ffffea000735e800 ffff8801cd7a0fb8 0000000000000000 ffff8801cd7a0fb8 ffff8801cd7a0fb8 ffff8801c938f8a8 ffffffff8153dc23 ffff8801cd7a0fb8 0000000000000008 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_address_description+0x73/0x280 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x275/0x360 mm/kasan/report.c:408 [] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:429 [] __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 [] lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:112 [inline] [] _raw_spin_lock_irqsave+0x4e/0x70 kernel/locking/spinlock.c:159 [] remove_wait_queue+0x14/0x40 kernel/sched/wait.c:49 [] ep_remove_wait_queue fs/eventpoll.c:535 [inline] [] ep_unregister_pollwait.isra.6+0xaf/0x240 fs/eventpoll.c:553 [] ep_free+0x96/0x1b0 fs/eventpoll.c:770 [] ep_eventpoll_release+0x44/0x60 fs/eventpoll.c:802 [] __fput+0x28c/0x6e0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x115/0x190 kernel/task_work.c:116 [] exit_task_work include/linux/task_work.h:21 [inline] [] do_exit+0x7e7/0x2a40 kernel/exit.c:833 [] do_group_exit+0x108/0x320 kernel/exit.c:937 [] SYSC_exit_group kernel/exit.c:948 [inline] [] SyS_exit_group+0x1d/0x20 kernel/exit.c:946 [] do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] [] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 [] entry_SYSENTER_compat+0x74/0x83 arch/x86/entry/entry_64_compat.S:127 Allocated by task 3319: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:609 kmem_cache_alloc_trace+0xfb/0x2a0 mm/slub.c:2742 kmalloc include/linux/slab.h:490 [inline] kzalloc include/linux/slab.h:636 [inline] binder_get_thread+0x15d/0x750 drivers/android/binder.c:4451 binder_poll+0x4a/0x210 drivers/android/binder.c:4554 ep_item_poll fs/eventpoll.c:811 [inline] ep_insert fs/eventpoll.c:1347 [inline] SYSC_epoll_ctl fs/eventpoll.c:1975 [inline] SyS_epoll_ctl+0x11d7/0x2190 fs/eventpoll.c:1861 do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 entry_SYSENTER_compat+0x74/0x83 arch/x86/entry/entry_64_compat.S:127 Freed by task 3319: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:582 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0x103/0x300 mm/slub.c:3878 binder_free_thread drivers/android/binder.c:4479 [inline] binder_thread_dec_tmpref+0x1cc/0x240 drivers/android/binder.c:2035 binder_thread_release+0x27d/0x540 drivers/android/binder.c:4543 binder_ioctl+0x9c0/0x11b0 drivers/android/binder.c:4759 C_SYSC_ioctl fs/compat_ioctl.c:1602 [inline] compat_SyS_ioctl+0x15f/0x2050 fs/compat_ioctl.c:1549 do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 entry_SYSENTER_compat+0x74/0x83 arch/x86/entry/entry_64_compat.S:127 The buggy address belongs to the object at ffff8801cd7a0f00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 184 bytes inside of 512-byte region [ffff8801cd7a0f00, ffff8801cd7a1100) The buggy address belongs to the page: page:ffffea000735e800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x8000000000004080(slab|head) page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cd7a0e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801cd7a0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801cd7a0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cd7a1000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cd7a1080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================