[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 21.114051] audit: type=1400 audit(1515625679.479:6): avc: denied { map } for pid=3468 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 [ 21.133423] sshd (3466) used greatest stack depth: 17040 bytes left Warning: Permanently added '10.128.0.5' (ECDSA) to the list of known hosts. executing program [ 32.442568] audit: type=1400 audit(1515625690.808:7): avc: denied { map } for pid=3483 comm="syzkaller090018" path="/root/syzkaller090018753" 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 [ 32.447356] ================================================================== [ 32.447367] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 32.447371] Read of size 8 at addr ffff8801c862d378 by task syzkaller090018/3483 [ 32.447372] [ 32.447376] CPU: 0 PID: 3483 Comm: syzkaller090018 Not tainted 4.15.0-rc6-mm1+ #52 [ 32.447379] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.447380] Call Trace: [ 32.447388] dump_stack+0x194/0x257 [ 32.447393] ? arch_local_irq_restore+0x53/0x53 [ 32.447399] ? show_regs_print_info+0x18/0x18 [ 32.447403] ? __lock_acquire+0x664/0x3e00 [ 32.447408] ? __lock_acquire+0x3d4d/0x3e00 [ 32.447415] print_address_description+0x73/0x250 [ 32.447418] ? __lock_acquire+0x3d4d/0x3e00 [ 32.447423] kasan_report+0x23b/0x360 [ 32.447428] __asan_report_load8_noabort+0x14/0x20 [ 32.447432] __lock_acquire+0x3d4d/0x3e00 [ 32.447436] ? lock_downgrade+0x980/0x980 [ 32.447443] ? remove_wait_queue+0x81/0x350 [ 32.447449] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 32.447453] ? __lock_acquire+0x664/0x3e00 [ 32.447456] ? check_noncircular+0x20/0x20 [ 32.447465] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 32.447469] ? lock_acquire+0x1d5/0x580 [ 32.447472] ? lock_acquire+0x1d5/0x580 [ 32.447476] ? ep_free+0xf4/0x320 [ 32.447481] ? check_noncircular+0x20/0x20 [ 32.447485] ? lock_release+0xa40/0xa40 [ 32.447489] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 32.447493] ? print_irqtrace_events+0x270/0x270 [ 32.447499] ? rcu_note_context_switch+0x710/0x710 [ 32.447504] ? __might_sleep+0x95/0x190 [ 32.447507] ? ep_free+0xf4/0x320 [ 32.447513] ? __mutex_lock+0x16f/0x1a80 [ 32.447516] ? ep_free+0xf4/0x320 [ 32.447520] ? print_irqtrace_events+0x270/0x270 [ 32.447523] ? ep_free+0xf4/0x320 [ 32.447528] lock_acquire+0x1d5/0x580 [ 32.447531] ? lock_acquire+0x1d5/0x580 [ 32.447535] ? remove_wait_queue+0x81/0x350 [ 32.447538] ? __lock_acquire+0x664/0x3e00 [ 32.447543] ? lock_release+0xa40/0xa40 [ 32.447549] ? lock_acquire+0x1d5/0x580 [ 32.447552] ? lock_acquire+0x1d5/0x580 [ 32.447555] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 32.447560] _raw_spin_lock_irqsave+0x96/0xc0 [ 32.447563] ? remove_wait_queue+0x81/0x350 [ 32.447567] remove_wait_queue+0x81/0x350 [ 32.447572] ? rcutorture_record_progress+0x10/0x10 [ 32.447576] ? add_wait_queue+0x290/0x290 [ 32.447579] ? rcutorture_record_progress+0x10/0x10 [ 32.447585] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 32.447590] ? unwind_get_return_address+0x61/0xa0 [ 32.447595] ? clear_tfile_check_list+0x370/0x370 [ 32.447600] ? check_noncircular+0x20/0x20 [ 32.447604] ? locks_remove_file+0x3fa/0x5a0 [ 32.447610] ep_free+0x13f/0x320 [ 32.447613] ? ep_remove+0x800/0x800 [ 32.447618] ? fsnotify_first_mark+0x2b0/0x2b0 [ 32.447622] ? ep_free+0x320/0x320 [ 32.447625] ep_eventpoll_release+0x44/0x60 [ 32.447629] __fput+0x327/0x7e0 [ 32.447634] ? fput+0x140/0x140 [ 32.447638] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.447643] ____fput+0x15/0x20 [ 32.447647] task_work_run+0x199/0x270 [ 32.447651] ? task_work_cancel+0x210/0x210 [ 32.447655] ? _raw_spin_unlock+0x22/0x30 [ 32.447659] ? switch_task_namespaces+0x87/0xc0 [ 32.447666] do_exit+0x9bb/0x1ad0 [ 32.447671] ? binder_ioctl+0x481/0x1417 [ 32.447675] ? mm_update_next_owner+0x930/0x930 [ 32.447680] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 32.447687] ? avc_ss_reset+0x110/0x110 [ 32.447690] ? mutex_unlock+0xd/0x10 [ 32.447694] ? SyS_epoll_ctl+0x30a/0x1a80 [ 32.447706] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 32.447709] ? up_read+0x1a/0x40 [ 32.447713] ? rcu_note_context_switch+0x710/0x710 [ 32.447717] ? __fd_install+0x288/0x740 [ 32.447723] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 32.447727] ? do_vfs_ioctl+0x486/0x1520 [ 32.447730] ? _cond_resched+0x14/0x30 [ 32.447735] ? ioctl_preallocate+0x2b0/0x2b0 [ 32.447739] ? selinux_capable+0x40/0x40 [ 32.447744] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.447749] do_group_exit+0x149/0x400 [ 32.447754] ? SyS_exit+0x30/0x30 [ 32.447758] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.447763] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.447768] SyS_exit_group+0x1d/0x20 [ 32.447771] entry_SYSCALL_64_fastpath+0x23/0x9a [ 32.447775] RIP: 0033:0x4429f8 [ 32.447777] RSP: 002b:00007fff2bd2ee38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 32.447781] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 32.447783] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 32.447785] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 32.447787] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 32.447789] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 32.447794] [ 32.447796] Allocated by task 3483: [ 32.447800] save_stack+0x43/0xd0 [ 32.447803] kasan_kmalloc+0xad/0xe0 [ 32.447806] kmem_cache_alloc_trace+0x136/0x750 [ 32.447809] binder_get_thread+0x1cf/0x870 [ 32.447812] binder_poll+0x8c/0x390 [ 32.447814] ep_item_poll.isra.10+0xf2/0x320 [ 32.447817] ep_insert+0x6a2/0x1ac0 [ 32.447819] SyS_epoll_ctl+0x12bf/0x1a80 [ 32.447822] entry_SYSCALL_64_fastpath+0x23/0x9a [ 32.447823] [ 32.447824] Freed by task 3483: [ 32.447827] save_stack+0x43/0xd0 [ 32.447830] __kasan_slab_free+0x11a/0x170 [ 32.447833] kasan_slab_free+0xe/0x10 [ 32.447836] kfree+0xd9/0x260 [ 32.447839] binder_thread_dec_tmpref+0x27f/0x310 [ 32.447842] binder_thread_release+0x27d/0x540 [ 32.447845] binder_ioctl+0xc02/0x1417 [ 32.447848] do_vfs_ioctl+0x1b1/0x1520 [ 32.447850] SyS_ioctl+0x8f/0xc0 [ 32.447853] entry_SYSCALL_64_fastpath+0x23/0x9a [ 32.447854] [ 32.447857] The buggy address belongs to the object at ffff8801c862d2c0 [ 32.447857] which belongs to the cache kmalloc-512 of size 512 [ 32.447860] The buggy address is located 184 bytes inside of [ 32.447860] 512-byte region [ffff8801c862d2c0, ffff8801c862d4c0) [ 32.447860] The buggy address belongs to the page: [ 32.447864] page:ffffea0007218b40 count:1 mapcount:0 mapping:ffff8801c862d040 index:0x0 [ 32.447867] flags: 0x2fffc0000000100(slab) [ 32.447873] raw: 02fffc0000000100 ffff8801c862d040 0000000000000000 0000000100000006 [ 32.447877] raw: ffffea00073736a0 ffffea000720aa60 ffff8801dac00940 0000000000000000 [ 32.447878] page dumped because: kasan: bad access detected [ 32.447879] [ 32.447880] Memory state around the buggy address: [ 32.447883] ffff8801c862d200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.447886] ffff8801c862d280: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 32.447888] >ffff8801c862d300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.447890] ^ [ 32.447892] ffff8801c862d380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.447895] ffff8801c862d400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.447896] ================================================================== [ 32.447897] Disabling lock debugging due to kernel taint [ 32.447899] Kernel panic - not syncing: panic_on_warn set ... [ 32.447899] [ 32.447903] CPU: 0 PID: 3483 Comm: syzkaller090018 Tainted: G B 4.15.0-rc6-mm1+ #52 [ 32.447905] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.447906] Call Trace: [ 32.447910] dump_stack+0x194/0x257 [ 32.447915] ? arch_local_irq_restore+0x53/0x53 [ 32.447918] ? kasan_end_report+0x32/0x50 [ 32.447922] ? lock_downgrade+0x980/0x980 [ 32.447925] ? vsnprintf+0x1ed/0x1900 [ 32.447929] ? __lock_acquire+0x3c50/0x3e00 [ 32.447933] panic+0x1e4/0x41c [ 32.447936] ? refcount_error_report+0x214/0x214 [ 32.447941] ? add_taint+0x40/0x50 [ 32.447944] ? add_taint+0x1c/0x50 [ 32.447948] ? __lock_acquire+0x3d4d/0x3e00 [ 32.447952] kasan_end_report+0x50/0x50 [ 32.447955] kasan_report+0x148/0x360 [ 32.447960] __asan_report_load8_noabort+0x14/0x20 [ 32.447964] __lock_acquire+0x3d4d/0x3e00 [ 32.447968] ? lock_downgrade+0x980/0x980 [ 32.447972] ? remove_wait_queue+0x81/0x350 [ 32.447978] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 32.447982] ? __lock_acquire+0x664/0x3e00 [ 32.447985] ? check_noncircular+0x20/0x20 [ 32.447992] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 32.447996] ? lock_acquire+0x1d5/0x580 [ 32.448000] ? lock_acquire+0x1d5/0x580 [ 32.448006] ? ep_free+0xf4/0x320 [ 32.448010] ? check_noncircular+0x20/0x20 [ 32.448014] ? lock_release+0xa40/0xa40 [ 32.448018] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 32.448022] ? print_irqtrace_events+0x270/0x270 [ 32.448026] ? rcu_note_context_switch+0x710/0x710 [ 32.448030] ? __might_sleep+0x95/0x190 [ 32.448033] ? ep_free+0xf4/0x320 [ 32.448037] ? __mutex_lock+0x16f/0x1a80 [ 32.448039] ? ep_free+0xf4/0x320 [ 32.448043] ? print_irqtrace_events+0x270/0x270 [ 32.448046] ? ep_free+0xf4/0x320 [ 32.448051] lock_acquire+0x1d5/0x580 [ 32.448054] ? lock_acquire+0x1d5/0x580 [ 32.448058] ? remove_wait_queue+0x81/0x350 [ 32.448061] ? __lock_acquire+0x664/0x3e00 [ 32.448066] ? lock_release+0xa40/0xa40 [ 32.448071] ? lock_acquire+0x1d5/0x580 [ 32.448074] ? lock_acquire+0x1d5/0x580 [ 32.448077] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 32.448082] _raw_spin_lock_irqsave+0x96/0xc0 [ 32.448085] ? remove_wait_queue+0x81/0x350 [ 32.448089] remove_wait_queue+0x81/0x350 [ 32.448093] ? rcutorture_record_progress+0x10/0x10 [ 32.448097] ? add_wait_queue+0x290/0x290 [ 32.448101] ? rcutorture_record_progress+0x10/0x10 [ 32.448106] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 32.448110] ? unwind_get_return_address+0x61/0xa0 [ 32.448114] ? clear_tfile_check_list+0x370/0x370 [ 32.448118] ? check_noncircular+0x20/0x20 [ 32.448123] ? locks_remove_file+0x3fa/0x5a0 [ 32.448127] ep_free+0x13f/0x320 [ 32.448131] ? ep_remove+0x800/0x800 [ 32.448138] ? fsnotify_first_mark+0x2b0/0x2b0 [ 32.448142] ? ep_free+0x320/0x320 [ 32.448146] ep_eventpoll_release+0x44/0x60 [ 32.448149] __fput+0x327/0x7e0 [ 32.448153] ? fput+0x140/0x140 [ 32.448157] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.448161] ____fput+0x15/0x20 [ 32.448164] task_work_run+0x199/0x270 [ 32.448168] ? task_work_cancel+0x210/0x210 [ 32.448172] ? _raw_spin_unlock+0x22/0x30 [ 32.448176] ? switch_task_namespaces+0x87/0xc0 [ 32.448180] do_exit+0x9bb/0x1ad0 [ 32.448184] ? binder_ioctl+0x481/0x1417 [ 32.448188] ? mm_update_next_owner+0x930/0x930 [ 32.448193] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 32.448198] ? avc_ss_reset+0x110/0x110 [ 32.448201] ? mutex_unlock+0xd/0x10 [ 32.448204] ? SyS_epoll_ctl+0x30a/0x1a80 [ 32.448215] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 32.448218] ? up_read+0x1a/0x40 [ 32.448222] ? rcu_note_context_switch+0x710/0x710 [ 32.448225] ? __fd_install+0x288/0x740 [ 32.448230] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 32.448234] ? do_vfs_ioctl+0x486/0x1520 [ 32.448237] ? _cond_resched+0x14/0x30 [ 32.448242] ? ioctl_preallocate+0x2b0/0x2b0 [ 32.448246] ? selinux_capable+0x40/0x40 [ 32.448250] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.448255] do_group_exit+0x149/0x400 [ 32.448259] ? SyS_exit+0x30/0x30 [ 32.448263] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.448267] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.448271] SyS_exit_group+0x1d/0x20 [ 32.448275] entry_SYSCALL_64_fastpath+0x23/0x9a [ 32.448277] RIP: 0033:0x4429f8 [ 32.448279] RSP: 002b:00007fff2bd2ee38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 32.448282] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 32.448284] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 32.448286] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 32.448288] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 32.448290] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 32.468487] Dumping ftrace buffer: [ 32.468490] (ftrace buffer empty) [ 32.468492] Kernel Offset: disabled [ 33.598309] Rebooting in 86400 seconds..