================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x387e/0x4b50 kernel/locking/lockdep.c:3092 Read of size 8 at addr ffff8801cf43d4b8 by task syz-executor4/5961 CPU: 0 PID: 5961 Comm: syz-executor4 Not tainted 4.4.113-gef588ef #33 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 955b01de0f27aed0 ffff8800b398f650 ffffffff81d0278d ffffea00073d0f00 ffff8801cf43d4b8 0000000000000000 ffff8801cf43d4b8 0000000000000000 ffff8800b398f688 ffffffff814fd053 ffff8801cf43d4b8 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x73/0x260 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x285/0x370 mm/kasan/report.c:408 [] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:429 [] __lock_acquire+0x387e/0x4b50 kernel/locking/lockdep.c:3092 [] lock_acquire+0x15e/0x460 kernel/locking/lockdep.c:3592 [] __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:530 [inline] [] ep_unregister_pollwait.isra.6+0xa8/0x220 fs/eventpoll.c:548 [] ep_free+0x93/0x1c0 fs/eventpoll.c:765 [] ep_eventpoll_release+0x44/0x60 fs/eventpoll.c:797 [] __fput+0x233/0x6d0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x104/0x180 kernel/task_work.c:115 [] exit_task_work include/linux/task_work.h:21 [inline] [] do_exit+0x82a/0x2a10 kernel/exit.c:755 [] do_group_exit+0x108/0x320 kernel/exit.c:885 [] get_signal+0x4f2/0x1550 kernel/signal.c:2317 [] do_signal+0x8b/0x1d40 arch/x86/kernel/signal.c:712 [] exit_to_usermode_loop+0x11a/0x160 arch/x86/entry/common.c:247 [] prepare_exit_to_usermode arch/x86/entry/common.c:282 [inline] [] syscall_return_slowpath+0x1b5/0x1f0 arch/x86/entry/common.c:347 [] int_ret_from_sys_call+0x25/0xa3 Allocated by task 5961: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:616 [] kmem_cache_alloc_trace+0x100/0x2b0 mm/slub.c:2642 [] kmalloc include/linux/slab.h:476 [inline] [] kzalloc include/linux/slab.h:620 [inline] [] binder_get_thread+0x15d/0x750 drivers/android/binder.c:4452 [] binder_poll+0x4a/0x210 drivers/android/binder.c:4555 [] ep_item_poll fs/eventpoll.c:806 [inline] [] ep_insert fs/eventpoll.c:1319 [inline] [] SYSC_epoll_ctl fs/eventpoll.c:1934 [inline] [] SyS_epoll_ctl+0x10b1/0x2040 fs/eventpoll.c:1833 [] entry_SYSCALL_64_fastpath+0x1c/0x98 Freed by task 5961: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kfree+0xfc/0x300 mm/slub.c:3749 [] binder_free_thread drivers/android/binder.c:4480 [inline] [] binder_thread_dec_tmpref+0x1c1/0x250 drivers/android/binder.c:2036 [] binder_thread_release+0x27d/0x540 drivers/android/binder.c:4544 [] binder_ioctl+0xb94/0x12e0 drivers/android/binder.c:4760 [] vfs_ioctl fs/ioctl.c:43 [inline] [] do_vfs_ioctl+0x7aa/0xee0 fs/ioctl.c:607 [] SYSC_ioctl fs/ioctl.c:622 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:613 [] entry_SYSCALL_64_fastpath+0x1c/0x98 The buggy address belongs to the object at ffff8801cf43d400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 184 bytes inside of 512-byte region [ffff8801cf43d400, ffff8801cf43d600) The buggy address belongs to the page: BUG: unable to handle kernel invalid opcode: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 5950 Comm: syz-executor2 Not tainted 4.4.113-gef588ef #33 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800b48f2f80 task.stack: ffff8800b16a0000 RIP: 0010:[] [] kasan_die_notifier+0x6/0x20 RSP: 0018:ffff8800b16a7298 EFLAGS: 00010046 RAX: 000000000000001d RBX: ffffffff8383ca60 RCX: ffffffff81269242 RDX: 0000000000010000 RSI: ffffc90002718000 RDI: ffff8800b48f37ec RBP: ffffffff810f0d38 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: fffffbfff0ad7e25 R12: ffff8800b16a7298 R13: ffffffff810c83f0 R14: dffffc0000000000 R15: ffff8800b16a7298 FS: 00007f9c15f81700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000002 CR3: 00000000b4532000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8800b16a72f8 ffffffff81194138 0000000000000000 dffffc0000000000 ffffffff811956b4 0000000000000008 0000000000000000 0000000000000001 0000000000000008 ffff8800b16a7368 ffff8800b16a7318 ffff8800b16a7330 Call Trace: Code: 83 ff ff ff ff c0 f2 83 83 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 0d 0f 81 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 RIP [] kasan_die_notifier+0x6/0x20 RSP ---[ end trace 8af3b4cdec36d8df ]---