[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 13.975805] audit: type=1400 audit(1515557821.738:6): avc: denied { map } for pid=3476 comm="sh" path="/bin/dash" dev="sda1" ino=1473 scontext=system_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 [ 19.693151] audit: type=1400 audit(1515557827.455:7): avc: denied { map } for pid=3482 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Warning: Permanently added '10.128.15.218' (ECDSA) to the list of known hosts. executing program [ 25.882536] audit: type=1400 audit(1515557833.645:8): avc: denied { map } for pid=3496 comm="syzkaller167565" path="/root/syzkaller167565642" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 25.886904] ================================================================== [ 25.886914] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 25.886918] Read of size 8 at addr ffff8801ce4a53b0 by task syzkaller167565/3496 [ 25.886919] [ 25.886923] CPU: 0 PID: 3496 Comm: syzkaller167565 Not tainted 4.15.0-rc7+ #255 [ 25.886926] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.886927] Call Trace: [ 25.886935] dump_stack+0x194/0x257 [ 25.886940] ? arch_local_irq_restore+0x53/0x53 [ 25.886945] ? show_regs_print_info+0x18/0x18 [ 25.886949] ? print_irqtrace_events+0x270/0x270 [ 25.886953] ? __lock_acquire+0x664/0x3e00 [ 25.886957] ? __lock_acquire+0x3d4d/0x3e00 [ 25.886963] print_address_description+0x73/0x250 [ 25.886967] ? __lock_acquire+0x3d4d/0x3e00 [ 25.886971] kasan_report+0x25b/0x340 [ 25.886976] __asan_report_load8_noabort+0x14/0x20 [ 25.886980] __lock_acquire+0x3d4d/0x3e00 [ 25.886983] ? __lock_acquire+0x664/0x3e00 [ 25.886986] ? lock_downgrade+0x980/0x980 [ 25.886990] ? lock_downgrade+0x980/0x980 [ 25.886996] ? remove_wait_queue+0x81/0x350 [ 25.887006] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.887011] ? __lock_acquire+0x664/0x3e00 [ 25.887014] ? check_noncircular+0x20/0x20 [ 25.887022] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.887026] ? lock_acquire+0x1d5/0x580 [ 25.887029] ? lock_acquire+0x1d5/0x580 [ 25.887034] ? ep_free+0xf4/0x320 [ 25.887039] ? lock_release+0xa40/0xa40 [ 25.887044] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.887048] ? print_irqtrace_events+0x270/0x270 [ 25.887054] ? rcu_note_context_switch+0x710/0x710 [ 25.887059] ? __might_sleep+0x95/0x190 [ 25.887062] ? ep_free+0xf4/0x320 [ 25.887067] ? __mutex_lock+0x16f/0x1a80 [ 25.887070] ? ep_free+0xf4/0x320 [ 25.887074] ? print_irqtrace_events+0x270/0x270 [ 25.887077] ? ep_free+0xf4/0x320 [ 25.887083] lock_acquire+0x1d5/0x580 [ 25.887086] ? lock_acquire+0x1d5/0x580 [ 25.887089] ? remove_wait_queue+0x81/0x350 [ 25.887093] ? __lock_acquire+0x664/0x3e00 [ 25.887097] ? lock_release+0xa40/0xa40 [ 25.887103] ? lock_acquire+0x1d5/0x580 [ 25.887106] ? lock_acquire+0x1d5/0x580 [ 25.887110] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.887116] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.887119] ? remove_wait_queue+0x81/0x350 [ 25.887123] remove_wait_queue+0x81/0x350 [ 25.887128] ? add_wait_queue+0x290/0x290 [ 25.887132] ? rcutorture_record_progress+0x10/0x10 [ 25.887138] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.887145] ? __kernel_text_address+0xd/0x40 [ 25.887150] ? clear_tfile_check_list+0x370/0x370 [ 25.887154] ? check_noncircular+0x20/0x20 [ 25.887160] ? locks_remove_file+0x3fa/0x5a0 [ 25.887166] ep_free+0x13f/0x320 [ 25.887170] ? ep_remove+0x800/0x800 [ 25.887174] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.887179] ? ep_free+0x320/0x320 [ 25.887182] ep_eventpoll_release+0x44/0x60 [ 25.887187] __fput+0x327/0x7e0 [ 25.887193] ? fput+0x140/0x140 [ 25.887197] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.887202] ____fput+0x15/0x20 [ 25.887206] task_work_run+0x199/0x270 [ 25.887211] ? task_work_cancel+0x210/0x210 [ 25.887215] ? _raw_spin_unlock+0x22/0x30 [ 25.887219] ? switch_task_namespaces+0x87/0xc0 [ 25.887226] do_exit+0x9bb/0x1ad0 [ 25.887231] ? binder_ioctl+0x481/0x1417 [ 25.887235] ? mm_update_next_owner+0x930/0x930 [ 25.887240] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.887247] ? avc_ss_reset+0x110/0x110 [ 25.887250] ? mutex_unlock+0xd/0x10 [ 25.887254] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.887266] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.887269] ? up_read+0x1a/0x40 [ 25.887273] ? rcu_note_context_switch+0x710/0x710 [ 25.887277] ? __fd_install+0x288/0x740 [ 25.887282] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.887286] ? do_vfs_ioctl+0x486/0x1520 [ 25.887289] ? _cond_resched+0x14/0x30 [ 25.887293] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.887298] ? selinux_capable+0x40/0x40 [ 25.887302] ? __alloc_fd+0x750/0x750 [ 25.887307] do_group_exit+0x149/0x400 [ 25.887312] ? SyS_exit+0x30/0x30 [ 25.887316] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.887321] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.887326] SyS_exit_group+0x1d/0x20 [ 25.887330] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.887333] RIP: 0033:0x4429f8 [ 25.887336] RSP: 002b:00007ffdcc387518 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.887340] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.887342] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.887344] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.887346] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.887348] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.887353] [ 25.887355] Allocated by task 3496: [ 25.887359] save_stack+0x43/0xd0 [ 25.887362] kasan_kmalloc+0xad/0xe0 [ 25.887365] kmem_cache_alloc_trace+0x136/0x750 [ 25.887367] binder_get_thread+0x1cf/0x870 [ 25.887370] binder_poll+0x8c/0x390 [ 25.887373] ep_item_poll.isra.10+0xec/0x320 [ 25.887376] ep_insert+0x6a3/0x1b10 [ 25.887379] SyS_epoll_ctl+0x12e4/0x1ab0 [ 25.887382] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.887383] [ 25.887385] Freed by task 3496: [ 25.887387] save_stack+0x43/0xd0 [ 25.887390] kasan_slab_free+0x71/0xc0 [ 25.887392] kfree+0xd6/0x260 [ 25.887400] binder_thread_dec_tmpref+0x27f/0x310 [ 25.887403] binder_thread_release+0x27d/0x540 [ 25.887406] binder_ioctl+0xc02/0x1417 [ 25.887408] do_vfs_ioctl+0x1b1/0x1520 [ 25.887411] SyS_ioctl+0x8f/0xc0 [ 25.887414] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.887415] [ 25.887418] The buggy address belongs to the object at ffff8801ce4a5300 [ 25.887418] which belongs to the cache kmalloc-512 of size 512 [ 25.887421] The buggy address is located 176 bytes inside of [ 25.887421] 512-byte region [ffff8801ce4a5300, ffff8801ce4a5500) [ 25.887421] The buggy address belongs to the page: [ 25.887425] page:ffffea0007392940 count:1 mapcount:0 mapping:ffff8801ce4a5080 index:0x0 [ 25.887428] flags: 0x2fffc0000000100(slab) [ 25.887434] raw: 02fffc0000000100 ffff8801ce4a5080 0000000000000000 0000000100000006 [ 25.887438] raw: ffffea0007392a60 ffffea00071f4260 ffff8801dac00940 0000000000000000 [ 25.887440] page dumped because: kasan: bad access detected [ 25.887440] [ 25.887441] Memory state around the buggy address: [ 25.887444] ffff8801ce4a5280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.887447] ffff8801ce4a5300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.887449] >ffff8801ce4a5380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.887451] ^ [ 25.887453] ffff8801ce4a5400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.887456] ffff8801ce4a5480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.887457] ================================================================== [ 25.887458] Disabling lock debugging due to kernel taint [ 25.887460] Kernel panic - not syncing: panic_on_warn set ... [ 25.887460] [ 25.887464] CPU: 0 PID: 3496 Comm: syzkaller167565 Tainted: G B 4.15.0-rc7+ #255 [ 25.887465] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.887466] Call Trace: [ 25.887470] dump_stack+0x194/0x257 [ 25.887475] ? arch_local_irq_restore+0x53/0x53 [ 25.887478] ? kasan_end_report+0x32/0x50 [ 25.887482] ? lock_downgrade+0x980/0x980 [ 25.887486] ? vsnprintf+0x1ed/0x1900 [ 25.887490] ? __lock_acquire+0x3cb0/0x3e00 [ 25.887493] panic+0x1e4/0x41c [ 25.887496] ? refcount_error_report+0x214/0x214 [ 25.887500] ? add_taint+0x40/0x50 [ 25.887503] ? add_taint+0x1c/0x50 [ 25.887507] ? __lock_acquire+0x3d4d/0x3e00 [ 25.887511] kasan_end_report+0x50/0x50 [ 25.887514] kasan_report+0x144/0x340 [ 25.887519] __asan_report_load8_noabort+0x14/0x20 [ 25.887522] __lock_acquire+0x3d4d/0x3e00 [ 25.887525] ? __lock_acquire+0x664/0x3e00 [ 25.887529] ? lock_downgrade+0x980/0x980 [ 25.887532] ? lock_downgrade+0x980/0x980 [ 25.887536] ? remove_wait_queue+0x81/0x350 [ 25.887541] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.887545] ? __lock_acquire+0x664/0x3e00 [ 25.887548] ? check_noncircular+0x20/0x20 [ 25.887555] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.887559] ? lock_acquire+0x1d5/0x580 [ 25.887562] ? lock_acquire+0x1d5/0x580 [ 25.887565] ? ep_free+0xf4/0x320 [ 25.887570] ? lock_release+0xa40/0xa40 [ 25.887573] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.887577] ? print_irqtrace_events+0x270/0x270 [ 25.887580] ? rcu_note_context_switch+0x710/0x710 [ 25.887585] ? __might_sleep+0x95/0x190 [ 25.887588] ? ep_free+0xf4/0x320 [ 25.887591] ? __mutex_lock+0x16f/0x1a80 [ 25.887594] ? ep_free+0xf4/0x320 [ 25.887598] ? print_irqtrace_events+0x270/0x270 [ 25.887601] ? ep_free+0xf4/0x320 [ 25.887606] lock_acquire+0x1d5/0x580 [ 25.887609] ? lock_acquire+0x1d5/0x580 [ 25.887613] ? remove_wait_queue+0x81/0x350 [ 25.887616] ? __lock_acquire+0x664/0x3e00 [ 25.887620] ? lock_release+0xa40/0xa40 [ 25.887625] ? lock_acquire+0x1d5/0x580 [ 25.887628] ? lock_acquire+0x1d5/0x580 [ 25.887632] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 25.887636] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.887640] ? remove_wait_queue+0x81/0x350 [ 25.887644] remove_wait_queue+0x81/0x350 [ 25.887648] ? add_wait_queue+0x290/0x290 [ 25.887651] ? rcutorture_record_progress+0x10/0x10 [ 25.887657] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 25.887661] ? __kernel_text_address+0xd/0x40 [ 25.887666] ? clear_tfile_check_list+0x370/0x370 [ 25.887670] ? check_noncircular+0x20/0x20 [ 25.887675] ? locks_remove_file+0x3fa/0x5a0 [ 25.887680] ep_free+0x13f/0x320 [ 25.887683] ? ep_remove+0x800/0x800 [ 25.887687] ? fsnotify_first_mark+0x2b0/0x2b0 [ 25.887691] ? ep_free+0x320/0x320 [ 25.887695] ep_eventpoll_release+0x44/0x60 [ 25.887698] __fput+0x327/0x7e0 [ 25.887703] ? fput+0x140/0x140 [ 25.887707] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.887712] ____fput+0x15/0x20 [ 25.887716] task_work_run+0x199/0x270 [ 25.887720] ? task_work_cancel+0x210/0x210 [ 25.887724] ? _raw_spin_unlock+0x22/0x30 [ 25.887727] ? switch_task_namespaces+0x87/0xc0 [ 25.887732] do_exit+0x9bb/0x1ad0 [ 25.887736] ? binder_ioctl+0x481/0x1417 [ 25.887739] ? mm_update_next_owner+0x930/0x930 [ 25.887744] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.887748] ? avc_ss_reset+0x110/0x110 [ 25.887751] ? mutex_unlock+0xd/0x10 [ 25.887755] ? SyS_epoll_ctl+0x30a/0x1ab0 [ 25.887765] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.887768] ? up_read+0x1a/0x40 [ 25.887771] ? rcu_note_context_switch+0x710/0x710 [ 25.887774] ? __fd_install+0x288/0x740 [ 25.887779] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 25.887782] ? do_vfs_ioctl+0x486/0x1520 [ 25.887785] ? _cond_resched+0x14/0x30 [ 25.887789] ? ioctl_preallocate+0x2b0/0x2b0 [ 25.887794] ? selinux_capable+0x40/0x40 [ 25.887797] ? __alloc_fd+0x750/0x750 [ 25.887802] do_group_exit+0x149/0x400 [ 25.887806] ? SyS_exit+0x30/0x30 [ 25.887810] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.887814] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.887818] SyS_exit_group+0x1d/0x20 [ 25.887822] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.887824] RIP: 0033:0x4429f8 [ 25.887826] RSP: 002b:00007ffdcc387518 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.887829] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.887831] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.887833] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.887835] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.887837] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.909032] Dumping ftrace buffer: [ 25.909036] (ftrace buffer empty) [ 25.909037] Kernel Offset: disabled [ 27.036276] Rebooting in 86400 seconds..