[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 2017/10/25 16:58:09 parsed 1 programs 2017/10/25 16:58:09 executed programs: 0 syzkaller login: [ 20.625860] ================================================================== [ 20.626510] BUG: KASAN: use-after-free in __lock_acquire+0x3c9f/0x3d50 [ 20.627197] Read of size 8 at addr ffff88006d213e28 by task syz-executor0/3002 [ 20.627954] [ 20.628125] CPU: 0 PID: 3002 Comm: syz-executor0 Not tainted 4.14.0-rc5-next-20171018+ #8 [ 20.628723] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 20.629315] Call Trace: [ 20.629502] dump_stack+0x194/0x257 [ 20.629760] ? arch_local_irq_restore+0x53/0x53 [ 20.630105] ? show_regs_print_info+0x65/0x65 [ 20.630427] ? print_irqtrace_events+0x270/0x270 [ 20.630761] ? print_irqtrace_events+0x270/0x270 [ 20.631108] ? __lock_acquire+0x3c9f/0x3d50 [ 20.631419] print_address_description+0x73/0x250 [ 20.631799] ? __lock_acquire+0x3c9f/0x3d50 [ 20.632131] kasan_report+0x25b/0x340 [ 20.632405] __asan_report_load8_noabort+0x14/0x20 [ 20.632757] __lock_acquire+0x3c9f/0x3d50 [ 20.633073] ? exit_pi_state_list+0x369/0x7a0 [ 20.633402] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 20.633777] ? __lock_acquire+0x6aa/0x3d50 [ 20.634095] ? __lock_acquire+0x6aa/0x3d50 [ 20.634409] ? __lock_acquire+0x6aa/0x3d50 [ 20.634700] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 20.635079] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 20.635808] ? check_noncircular+0x20/0x20 [ 20.636253] ? osq_unlock+0x350/0x350 [ 20.636653] ? __lock_acquire+0x6aa/0x3d50 [ 20.637093] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 20.637547] ? check_noncircular+0x20/0x20 [ 20.637840] ? print_irqtrace_events+0x270/0x270 [ 20.638202] ? check_noncircular+0x20/0x20 [ 20.638506] ? lock_release+0xa40/0xa40 [ 20.638780] ? switched_to_fair+0xb0/0xb0 [ 20.639557] ? __lock_is_held+0xb6/0x140 [ 20.639940] ? find_held_lock+0x35/0x1d0 [ 20.640235] lock_acquire+0x1d5/0x580 [ 20.640509] ? lock_acquire+0x1d5/0x580 [ 20.640796] ? exit_pi_state_list+0x369/0x7a0 [ 20.641120] ? lock_downgrade+0x990/0x990 [ 20.641418] ? lock_release+0xa40/0xa40 [ 20.641703] ? do_raw_spin_trylock+0x190/0x190 [ 20.642031] ? lock_downgrade+0x990/0x990 [ 20.642334] _raw_spin_lock_irq+0x5e/0x80 [ 20.642632] ? exit_pi_state_list+0x369/0x7a0 [ 20.642957] exit_pi_state_list+0x369/0x7a0 [ 20.643273] ? futex_wait_requeue_pi.constprop.19+0x1300/0x1300 [ 20.643781] ? lock_release+0xa40/0xa40 [ 20.644118] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 20.644622] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 20.645038] ? __might_sleep+0x95/0x190 [ 20.645328] ? __might_fault+0x188/0x1d0 [ 20.645624] ? do_raw_spin_trylock+0x190/0x190 [ 20.645956] mm_release+0x46d/0x590 [ 20.646218] ? do_raw_spin_trylock+0x190/0x190 [ 20.646549] ? mm_access+0x140/0x140 [ 20.646819] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.647171] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.647573] ? trace_hardirqs_on+0xd/0x10 [ 20.647885] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.648237] ? acct_collect+0x637/0x800 [ 20.648538] do_exit+0x481/0x1ad0 [ 20.648792] ? mm_update_next_owner+0x930/0x930 [ 20.649129] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 20.649551] ? rcu_note_context_switch+0x710/0x710 [ 20.649904] ? futex_wait_setup+0x14a/0x3d0 [ 20.650216] ? __might_sleep+0x95/0x190 [ 20.650504] ? find_held_lock+0x35/0x1d0 [ 20.650798] ? futex_wait+0x402/0x990 [ 20.651072] ? lock_downgrade+0x990/0x990 [ 20.651372] ? do_raw_spin_trylock+0x190/0x190 [ 20.651734] ? check_noncircular+0x20/0x20 [ 20.652042] ? futex_wake+0x680/0x680 [ 20.652317] ? mmdrop+0x18/0x30 [ 20.652555] ? drop_futex_key_refs.isra.13+0x63/0xa0 [ 20.652922] ? futex_wait+0x69e/0x990 [ 20.653198] ? find_held_lock+0x35/0x1d0 [ 20.653492] ? get_signal+0x7ae/0x16d0 [ 20.653773] ? lock_downgrade+0x990/0x990 [ 20.654073] do_group_exit+0x149/0x400 [ 20.654355] ? __lock_is_held+0xb6/0x140 [ 20.654647] ? SyS_exit+0x30/0x30 [ 20.654901] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.655233] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.655634] get_signal+0x73f/0x16d0 [ 20.655906] ? ptrace_notify+0x130/0x130 [ 20.656200] ? vma_wants_writenotify+0x3b0/0x3b0 [ 20.656542] ? vma_link+0xe9/0x170 [ 20.656801] ? exit_robust_list+0x240/0x240 [ 20.657113] ? find_held_lock+0x35/0x1d0 [ 20.657408] do_signal+0x94/0x1ee0 [ 20.657665] ? vm_mmap_pgoff+0x1ed/0x280 [ 20.657958] ? should_fail+0x23b/0xa40 [ 20.658239] ? fault_create_debugfs_attr+0x1f0/0x1f0 [ 20.658618] ? setup_sigcontext+0x7d0/0x7d0 [ 20.658931] ? find_held_lock+0x35/0x1d0 [ 20.659261] ? lock_downgrade+0x990/0x990 [ 20.659620] ? down_read_killable+0x180/0x180 [ 20.659975] ? lock_release+0xa40/0xa40 [ 20.660615] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 20.661041] ? vm_mmap_pgoff+0x1fc/0x280 [ 20.661374] ? exit_to_usermode_loop+0x8c/0x310 [ 20.661732] exit_to_usermode_loop+0x214/0x310 [ 20.662090] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 20.662491] ? kasan_check_write+0x14/0x20 [ 20.662800] syscall_return_slowpath+0x42f/0x510 [ 20.663145] ? prepare_exit_to_usermode+0x2d0/0x2d0 [ 20.663524] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 20.663888] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.664250] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 20.664595] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 20.664936] RIP: 0033:0x447c89 [ 20.665167] RSP: 002b:00007fedddbd5ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 20.665720] RAX: fffffffffffffe00 RBX: 0000000000748048 RCX: 0000000000447c89 [ 20.666241] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000748048 [ 20.666761] RBP: 0000000000748048 R08: 0000000000000000 R09: 0000000000748020 [ 20.667282] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 20.667830] R13: 0000000000000000 R14: 00007fedddbd69c0 R15: 00007fedddbd6700 [ 20.668354] [ 20.668473] Allocated by task 3004: [ 20.668738] save_stack+0x43/0xd0 [ 20.669030] kasan_kmalloc+0xad/0xe0 [ 20.669339] kmem_cache_alloc_trace+0x136/0x750 [ 20.669675] refill_pi_state_cache.part.6+0xa5/0x2f0 [ 20.670094] futex_requeue+0x1887/0x2370 [ 20.670387] do_futex+0x7f5/0x20d0 [ 20.670642] SyS_futex+0x260/0x390 [ 20.670898] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 20.671236] [ 20.671355] Freed by task 3003: [ 20.671619] save_stack+0x43/0xd0 [ 20.671894] kasan_slab_free+0x71/0xc0 [ 20.672216] kfree+0xca/0x250 [ 20.672441] put_pi_state+0x3f4/0x560 [ 20.672715] unqueue_me_pi+0x4a/0xc0 [ 20.672996] futex_wait_requeue_pi.constprop.19+0xc7f/0x1300 [ 20.673415] do_futex+0x825/0x20d0 [ 20.673706] SyS_futex+0x260/0x390 [ 20.673984] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 20.674355] [ 20.674472] The buggy address belongs to the object at ffff88006d213e00 [ 20.674472] which belongs to the cache kmalloc-256 of size 256 [ 20.675470] The buggy address is located 40 bytes inside of [ 20.675470] 256-byte region [ffff88006d213e00, ffff88006d213f00) [ 20.676510] The buggy address belongs to the page: [ 20.676924] page:ffffea0001b484c0 count:1 mapcount:0 mapping:ffff88006d213040 index:0xffff88006d213cc0 [ 20.677714] flags: 0x500000000000100(slab) [ 20.678073] raw: 0500000000000100 ffff88006d213040 ffff88006d213cc0 0000000100000001 [ 20.678735] raw: ffffea0001b485e0 ffffea0001a705a0 ffff88003e8007c0 0000000000000000 [ 20.679390] page dumped because: kasan: bad access detected [ 20.679873] [ 20.680003] Memory state around the buggy address: [ 20.680419] ffff88006d213d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.681015] ffff88006d213d80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 20.681933] >ffff88006d213e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.682553] ^ [ 20.682941] ffff88006d213e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.683565] ffff88006d213f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.684181] ================================================================== [ 20.684802] Disabling lock debugging due to kernel taint [ 20.685290] Kernel panic - not syncing: panic_on_warn set ... [ 20.685290] [ 20.686015] CPU: 0 PID: 3002 Comm: syz-executor0 Tainted: G B 4.14.0-rc5-next-20171018+ #8 [ 20.686931] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 20.687640] Call Trace: [ 20.687866] dump_stack+0x194/0x257 [ 20.688147] ? arch_local_irq_restore+0x53/0x53 [ 20.688593] ? kasan_end_report+0x32/0x50 [ 20.688942] ? lock_downgrade+0x990/0x990 [ 20.689294] ? vsnprintf+0x1ed/0x1900 [ 20.689618] ? __lock_acquire+0x3c50/0x3d50 [ 20.689981] panic+0x1e4/0x41c [ 20.690255] ? refcount_error_report+0x214/0x214 [ 20.690660] ? add_taint+0x40/0x50 [ 20.690959] ? add_taint+0x1c/0x50 [ 20.691262] ? __lock_acquire+0x3c9f/0x3d50 [ 20.691633] kasan_end_report+0x50/0x50 [ 20.691965] kasan_report+0x144/0x340 [ 20.692268] __asan_report_load8_noabort+0x14/0x20 [ 20.692687] __lock_acquire+0x3c9f/0x3d50 [ 20.693040] ? exit_pi_state_list+0x369/0x7a0 [ 20.693421] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 20.693848] ? __lock_acquire+0x6aa/0x3d50 [ 20.694182] ? __lock_acquire+0x6aa/0x3d50 [ 20.694542] ? __lock_acquire+0x6aa/0x3d50 [ 20.694902] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 20.695319] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 20.695792] ? check_noncircular+0x20/0x20 [ 20.696116] ? osq_unlock+0x350/0x350 [ 20.696392] ? __lock_acquire+0x6aa/0x3d50 [ 20.696699] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 20.697074] ? check_noncircular+0x20/0x20 [ 20.697380] ? print_irqtrace_events+0x270/0x270 [ 20.697722] ? check_noncircular+0x20/0x20 [ 20.698028] ? lock_release+0xa40/0xa40 [ 20.698315] ? switched_to_fair+0xb0/0xb0 [ 20.698615] ? __lock_is_held+0xb6/0x140 [ 20.698942] ? find_held_lock+0x35/0x1d0 [ 20.699235] lock_acquire+0x1d5/0x580 [ 20.699513] ? lock_acquire+0x1d5/0x580 [ 20.699800] ? exit_pi_state_list+0x369/0x7a0 [ 20.700152] ? lock_downgrade+0x990/0x990 [ 20.700465] ? lock_release+0xa40/0xa40 [ 20.700778] ? do_raw_spin_trylock+0x190/0x190 [ 20.701134] ? lock_downgrade+0x990/0x990 [ 20.701530] _raw_spin_lock_irq+0x5e/0x80 [ 20.701909] ? exit_pi_state_list+0x369/0x7a0 [ 20.702301] exit_pi_state_list+0x369/0x7a0 [ 20.702694] ? futex_wait_requeue_pi.constprop.19+0x1300/0x1300 [ 20.703672] ? lock_release+0xa40/0xa40 [ 20.704000] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 20.704480] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 20.704930] ? __might_sleep+0x95/0x190 [ 20.705273] ? __might_fault+0x188/0x1d0 [ 20.705662] ? do_raw_spin_trylock+0x190/0x190 [ 20.706021] mm_release+0x46d/0x590 [ 20.706393] ? do_raw_spin_trylock+0x190/0x190 [ 20.706737] ? mm_access+0x140/0x140 [ 20.707007] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.707332] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.707724] ? trace_hardirqs_on+0xd/0x10 [ 20.708025] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.708351] ? acct_collect+0x637/0x800 [ 20.708640] do_exit+0x481/0x1ad0 [ 20.708893] ? mm_update_next_owner+0x930/0x930 [ 20.709233] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 20.709658] ? rcu_note_context_switch+0x710/0x710 [ 20.710014] ? futex_wait_setup+0x14a/0x3d0 [ 20.710327] ? __might_sleep+0x95/0x190 [ 20.710617] ? find_held_lock+0x35/0x1d0 [ 20.710914] ? futex_wait+0x402/0x990 [ 20.711191] ? lock_downgrade+0x990/0x990 [ 20.712045] ? do_raw_spin_trylock+0x190/0x190 [ 20.712382] ? check_noncircular+0x20/0x20 [ 20.712692] ? futex_wake+0x680/0x680 [ 20.712971] ? mmdrop+0x18/0x30 [ 20.713216] ? drop_futex_key_refs.isra.13+0x63/0xa0 [ 20.713588] ? futex_wait+0x69e/0x990 [ 20.713867] ? find_held_lock+0x35/0x1d0 [ 20.714196] ? get_signal+0x7ae/0x16d0 [ 20.714482] ? lock_downgrade+0x990/0x990 [ 20.714793] do_group_exit+0x149/0x400 [ 20.715086] ? __lock_is_held+0xb6/0x140 [ 20.715404] ? SyS_exit+0x30/0x30 [ 20.716338] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.716739] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.717165] get_signal+0x73f/0x16d0 [ 20.717486] ? ptrace_notify+0x130/0x130 [ 20.717836] ? vma_wants_writenotify+0x3b0/0x3b0 [ 20.718240] ? vma_link+0xe9/0x170 [ 20.718546] ? exit_robust_list+0x240/0x240 [ 20.718919] ? find_held_lock+0x35/0x1d0 [ 20.719269] do_signal+0x94/0x1ee0 [ 20.719660] ? vm_mmap_pgoff+0x1ed/0x280 [ 20.720004] ? should_fail+0x23b/0xa40 [ 20.720341] ? fault_create_debugfs_attr+0x1f0/0x1f0 [ 20.720721] ? setup_sigcontext+0x7d0/0x7d0 [ 20.721034] ? find_held_lock+0x35/0x1d0 [ 20.721370] ? lock_downgrade+0x990/0x990 [ 20.721668] ? down_read_killable+0x180/0x180 [ 20.722033] ? lock_release+0xa40/0xa40 [ 20.722374] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 20.722931] ? vm_mmap_pgoff+0x1fc/0x280 [ 20.723334] ? exit_to_usermode_loop+0x8c/0x310 [ 20.723816] exit_to_usermode_loop+0x214/0x310 [ 20.724312] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 20.724728] ? kasan_check_write+0x14/0x20 [ 20.725052] syscall_return_slowpath+0x42f/0x510 [ 20.725398] ? prepare_exit_to_usermode+0x2d0/0x2d0 [ 20.725762] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 20.726119] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.726482] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 20.726829] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 20.727173] RIP: 0033:0x447c89 [ 20.727404] RSP: 002b:00007fedddbd5ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 20.728051] RAX: fffffffffffffe00 RBX: 0000000000748048 RCX: 0000000000447c89 [ 20.728605] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000748048 [ 20.729198] RBP: 0000000000748048 R08: 0000000000000000 R09: 0000000000748020 [ 20.729781] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 20.730316] R13: 0000000000000000 R14: 00007fedddbd69c0 R15: 00007fedddbd6700 [ 20.731561] Dumping ftrace buffer: [ 20.731869] (ftrace buffer empty) [ 20.732187] Kernel Offset: disabled [ 20.732502] Rebooting in 86400 seconds..