================================================================== BUG: KASAN: use-after-free in cross_lock kernel/locking/lockdep.c:4799 [inline] BUG: KASAN: use-after-free in lock_acquire_crosslock kernel/locking/lockdep.c:4970 [inline] BUG: KASAN: use-after-free in __lock_acquire+0x9d2/0x4620 kernel/locking/lockdep.c:3501 Read of size 4 at addr ffff88006c2aea78 by task syz-executor6/3146 CPU: 3 PID: 3146 Comm: syz-executor6 Not tainted 4.13.0-rc6-next-20170828+ #10 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x24e/0x340 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 cross_lock kernel/locking/lockdep.c:4799 [inline] lock_acquire_crosslock kernel/locking/lockdep.c:4970 [inline] __lock_acquire+0x9d2/0x4620 kernel/locking/lockdep.c:3501 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4002 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:159 ep_poll_callback+0x155/0x10d0 fs/eventpoll.c:1148 __wake_up_common+0xb4/0x150 kernel/sched/wait.c:74 __wake_up+0x34/0x50 kernel/sched/wait.c:96 signalfd_cleanup+0x11c/0x150 fs/signalfd.c:47 __cleanup_sighand+0x1f/0x40 kernel/fork.c:1332 __exit_signal kernel/exit.c:166 [inline] release_task+0xdd0/0x1a40 kernel/exit.c:199 wait_task_zombie kernel/exit.c:1161 [inline] wait_consider_task+0x29b2/0x33c0 kernel/exit.c:1388 do_wait_thread kernel/exit.c:1451 [inline] do_wait+0x441/0xa90 kernel/exit.c:1522 kernel_wait4+0x1f5/0x370 kernel/exit.c:1664 SYSC_wait4+0x134/0x140 kernel/exit.c:1676 SyS_wait4+0x2c/0x40 kernel/exit.c:1672 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x40bc8c RSP: 002b:0000000000a5fa08 EFLAGS: 00000246 ORIG_RAX: 000000000000003d RAX: ffffffffffffffda RBX: 000000000000d6cb RCX: 000000000040bc8c RDX: 0000000040000001 RSI: 0000000000a5fa2c RDI: ffffffffffffffff RBP: 0000000000000086 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000a5f9c0 R13: 00000000000001f6 R14: 000000000000001d R15: 000000000000d637 Allocated by task 7764: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 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:3627 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:666 [inline] ep_alloc+0xf9/0x3c0 fs/eventpoll.c:1029 SYSC_epoll_create1 fs/eventpoll.c:1960 [inline] SyS_epoll_create1+0xa0/0x230 fs/eventpoll.c:1946 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 7775: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 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:3503 [inline] kfree+0xca/0x250 mm/slab.c:3820 ep_free+0x27e/0x320 fs/eventpoll.c:865 ep_eventpoll_release+0x44/0x60 fs/eventpoll.c:873 __fput+0x333/0x7f0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:246 task_work_run+0x199/0x270 kernel/task_work.c:112 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0xa52/0x1b40 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+0x1f/0xbe The buggy address belongs to the object at ffff88006c2aea40 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 56 bytes inside of 512-byte region [ffff88006c2aea40, ffff88006c2aec40) The buggy address belongs to the page: page:ffffea0001b0ab80 count:1 mapcount:0 mapping:ffff88006c2ae040 index:0x0 flags: 0x500000000000100(slab) raw: 0500000000000100 ffff88006c2ae040 0000000000000000 0000000100000006 raw: ffffea0001ac62e0 ffffea0001a66160 ffff88003e800940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88006c2ae900: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88006c2ae980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88006c2aea00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff88006c2aea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88006c2aeb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================