[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 11.801542] audit: type=1400 audit(1514386399.230:6): avc: denied { map } for pid=3131 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 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.53' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 33.212475] audit: type=1400 audit(1514386420.641:7): avc: denied { map } for pid=3149 comm="syzkaller797075" path="/root/syzkaller797075201" 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 [ 33.216036] ================================================================== [ 33.216047] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 33.216052] Read of size 8 at addr ffff8801ca2bb178 by task syzkaller797075/3149 [ 33.216052] [ 33.216057] CPU: 0 PID: 3149 Comm: syzkaller797075 Not tainted 4.15.0-rc4-mm1+ #49 [ 33.216059] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.216060] Call Trace: [ 33.216068] dump_stack+0x194/0x257 [ 33.216072] ? arch_local_irq_restore+0x53/0x53 [ 33.216078] ? show_regs_print_info+0x18/0x18 [ 33.216082] ? print_irqtrace_events+0x270/0x270 [ 33.216085] ? __lock_acquire+0x664/0x3e00 [ 33.216089] ? __lock_acquire+0x3d4d/0x3e00 [ 33.216097] print_address_description+0x73/0x250 [ 33.216100] ? __lock_acquire+0x3d4d/0x3e00 [ 33.216104] kasan_report+0x23b/0x360 [ 33.216109] __asan_report_load8_noabort+0x14/0x20 [ 33.216113] __lock_acquire+0x3d4d/0x3e00 [ 33.216116] ? __lock_acquire+0x664/0x3e00 [ 33.216119] ? lock_downgrade+0x980/0x980 [ 33.216122] ? lock_downgrade+0x980/0x980 [ 33.216129] ? remove_wait_queue+0x81/0x350 [ 33.216134] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.216138] ? __lock_acquire+0x664/0x3e00 [ 33.216142] ? check_noncircular+0x20/0x20 [ 33.216150] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.216154] ? lock_acquire+0x1d5/0x580 [ 33.216157] ? lock_acquire+0x1d5/0x580 [ 33.216162] ? ep_free+0xf4/0x320 [ 33.216167] ? lock_release+0xa40/0xa40 [ 33.216172] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 33.216175] ? print_irqtrace_events+0x270/0x270 [ 33.216180] ? rcu_note_context_switch+0x710/0x710 [ 33.216185] ? __might_sleep+0x95/0x190 [ 33.216189] ? ep_free+0xf4/0x320 [ 33.216194] ? __mutex_lock+0x16f/0x1a80 [ 33.216196] ? ep_free+0xf4/0x320 [ 33.216201] ? print_irqtrace_events+0x270/0x270 [ 33.216204] ? ep_free+0xf4/0x320 [ 33.216209] lock_acquire+0x1d5/0x580 [ 33.216212] ? lock_acquire+0x1d5/0x580 [ 33.216215] ? remove_wait_queue+0x81/0x350 [ 33.216219] ? __lock_acquire+0x664/0x3e00 [ 33.216223] ? lock_release+0xa40/0xa40 [ 33.216229] ? lock_acquire+0x1d5/0x580 [ 33.216232] ? lock_acquire+0x1d5/0x580 [ 33.216236] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 33.216241] _raw_spin_lock_irqsave+0x96/0xc0 [ 33.216245] ? remove_wait_queue+0x81/0x350 [ 33.216249] remove_wait_queue+0x81/0x350 [ 33.216253] ? add_wait_queue+0x290/0x290 [ 33.216257] ? rcutorture_record_progress+0x10/0x10 [ 33.216263] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 33.216268] ? __kernel_text_address+0xd/0x40 [ 33.216273] ? clear_tfile_check_list+0x370/0x370 [ 33.216278] ? check_noncircular+0x20/0x20 [ 33.216283] ? locks_remove_file+0x3fa/0x5a0 [ 33.216289] ep_free+0x13f/0x320 [ 33.216292] ? ep_remove+0x800/0x800 [ 33.216296] ? fsnotify_first_mark+0x2b0/0x2b0 [ 33.216300] ? ep_free+0x320/0x320 [ 33.216304] ep_eventpoll_release+0x44/0x60 [ 33.216308] __fput+0x327/0x7e0 [ 33.216314] ? fput+0x140/0x140 [ 33.216318] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.216323] ____fput+0x15/0x20 [ 33.216327] task_work_run+0x199/0x270 [ 33.216331] ? task_work_cancel+0x210/0x210 [ 33.216335] ? _raw_spin_unlock+0x22/0x30 [ 33.216338] ? switch_task_namespaces+0x87/0xc0 [ 33.216344] do_exit+0x9bb/0x1ad0 [ 33.216350] ? binder_ioctl+0x551/0x1417 [ 33.216353] ? mm_update_next_owner+0x930/0x930 [ 33.216358] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 33.216364] ? avc_ss_reset+0x110/0x110 [ 33.216369] ? mutex_unlock+0xd/0x10 [ 33.216373] ? SyS_epoll_ctl+0x30a/0x1a80 [ 33.216385] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 33.216389] ? up_read+0x1a/0x40 [ 33.216393] ? rcu_note_context_switch+0x710/0x710 [ 33.216397] ? __fd_install+0x288/0x740 [ 33.216402] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 33.216406] ? do_vfs_ioctl+0x486/0x1520 [ 33.216409] ? _cond_resched+0x14/0x30 [ 33.216414] ? ioctl_preallocate+0x2b0/0x2b0 [ 33.216418] ? selinux_capable+0x40/0x40 [ 33.216422] ? __alloc_fd+0x750/0x750 [ 33.216427] do_group_exit+0x149/0x400 [ 33.216432] ? SyS_exit+0x30/0x30 [ 33.216436] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.216443] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.216447] SyS_exit_group+0x1d/0x20 [ 33.216454] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 33.216457] RIP: 0033:0x4429f8 [ 33.216459] RSP: 002b:00007ffee0096c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 33.216463] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 33.216465] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 33.216468] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 33.216470] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 33.216472] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 33.216477] [ 33.216479] Allocated by task 3149: [ 33.216483] save_stack+0x43/0xd0 [ 33.216486] kasan_kmalloc+0xad/0xe0 [ 33.216489] kmem_cache_alloc_trace+0x136/0x750 [ 33.216492] binder_get_thread+0x1cf/0x870 [ 33.216495] binder_poll+0x8c/0x390 [ 33.216497] ep_item_poll.isra.10+0xf2/0x320 [ 33.216500] ep_insert+0x6a2/0x1ac0 [ 33.216503] SyS_epoll_ctl+0x12bf/0x1a80 [ 33.216506] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 33.216507] [ 33.216508] Freed by task 3149: [ 33.216511] save_stack+0x43/0xd0 [ 33.216514] kasan_slab_free+0x71/0xc0 [ 33.216516] kfree+0xd6/0x260 [ 33.216519] binder_thread_dec_tmpref+0x27f/0x310 [ 33.216522] binder_thread_release+0x27d/0x540 [ 33.216524] binder_ioctl+0xc02/0x1417 [ 33.216527] do_vfs_ioctl+0x1b1/0x1520 [ 33.216529] SyS_ioctl+0x8f/0xc0 [ 33.216532] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 33.216533] [ 33.216535] The buggy address belongs to the object at ffff8801ca2bb0c0 [ 33.216535] which belongs to the cache kmalloc-512 of size 512 [ 33.216538] The buggy address is located 184 bytes inside of [ 33.216538] 512-byte region [ffff8801ca2bb0c0, ffff8801ca2bb2c0) [ 33.216539] The buggy address belongs to the page: [ 33.216542] page:ffffea000728aec0 count:1 mapcount:0 mapping:ffff8801ca2bb0c0 index:0x0 [ 33.216545] flags: 0x2fffc0000000100(slab) [ 33.216551] raw: 02fffc0000000100 ffff8801ca2bb0c0 0000000000000000 0000000100000006 [ 33.216555] raw: ffffea0007241ae0 ffffea000725ad60 ffff8801dac00940 0000000000000000 [ 33.216556] page dumped because: kasan: bad access detected [ 33.216557] [ 33.216558] Memory state around the buggy address: [ 33.216561] ffff8801ca2bb000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.216564] ffff8801ca2bb080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 33.216566] >ffff8801ca2bb100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.216568] ^ [ 33.216570] ffff8801ca2bb180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.216573] ffff8801ca2bb200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.216574] ================================================================== [ 33.216575] Disabling lock debugging due to kernel taint [ 33.216578] Kernel panic - not syncing: panic_on_warn set ... [ 33.216578] [ 33.216581] CPU: 0 PID: 3149 Comm: syzkaller797075 Tainted: G B 4.15.0-rc4-mm1+ #49 [ 33.216583] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.216584] Call Trace: [ 33.216588] dump_stack+0x194/0x257 [ 33.216592] ? arch_local_irq_restore+0x53/0x53 [ 33.216595] ? kasan_end_report+0x32/0x50 [ 33.216599] ? lock_downgrade+0x980/0x980 [ 33.216602] ? vsnprintf+0x1ed/0x1900 [ 33.216606] ? __lock_acquire+0x3c90/0x3e00 [ 33.216609] panic+0x1e4/0x41c [ 33.216614] ? refcount_error_report+0x214/0x214 [ 33.216618] ? add_taint+0x40/0x50 [ 33.216621] ? add_taint+0x1c/0x50 [ 33.216625] ? __lock_acquire+0x3d4d/0x3e00 [ 33.216628] kasan_end_report+0x50/0x50 [ 33.216632] kasan_report+0x148/0x360 [ 33.216637] __asan_report_load8_noabort+0x14/0x20 [ 33.216640] __lock_acquire+0x3d4d/0x3e00 [ 33.216643] ? __lock_acquire+0x664/0x3e00 [ 33.216646] ? lock_downgrade+0x980/0x980 [ 33.216649] ? lock_downgrade+0x980/0x980 [ 33.216654] ? remove_wait_queue+0x81/0x350 [ 33.216659] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.216662] ? __lock_acquire+0x664/0x3e00 [ 33.216665] ? check_noncircular+0x20/0x20 [ 33.216672] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 33.216676] ? lock_acquire+0x1d5/0x580 [ 33.216679] ? lock_acquire+0x1d5/0x580 [ 33.216682] ? ep_free+0xf4/0x320 [ 33.216687] ? lock_release+0xa40/0xa40 [ 33.216690] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 33.216694] ? print_irqtrace_events+0x270/0x270 [ 33.216698] ? rcu_note_context_switch+0x710/0x710 [ 33.216702] ? __might_sleep+0x95/0x190 [ 33.216705] ? ep_free+0xf4/0x320 [ 33.216708] ? __mutex_lock+0x16f/0x1a80 [ 33.216711] ? ep_free+0xf4/0x320 [ 33.216715] ? print_irqtrace_events+0x270/0x270 [ 33.216718] ? ep_free+0xf4/0x320 [ 33.216722] lock_acquire+0x1d5/0x580 [ 33.216725] ? lock_acquire+0x1d5/0x580 [ 33.216729] ? remove_wait_queue+0x81/0x350 [ 33.216732] ? __lock_acquire+0x664/0x3e00 [ 33.216736] ? lock_release+0xa40/0xa40 [ 33.216741] ? lock_acquire+0x1d5/0x580 [ 33.216744] ? lock_acquire+0x1d5/0x580 [ 33.216748] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 33.216753] _raw_spin_lock_irqsave+0x96/0xc0 [ 33.216756] ? remove_wait_queue+0x81/0x350 [ 33.216760] remove_wait_queue+0x81/0x350 [ 33.216764] ? add_wait_queue+0x290/0x290 [ 33.216768] ? rcutorture_record_progress+0x10/0x10 [ 33.216773] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 33.216777] ? __kernel_text_address+0xd/0x40 [ 33.216786] ? clear_tfile_check_list+0x370/0x370 [ 33.216790] ? check_noncircular+0x20/0x20 [ 33.216795] ? locks_remove_file+0x3fa/0x5a0 [ 33.216800] ep_free+0x13f/0x320 [ 33.216803] ? ep_remove+0x800/0x800 [ 33.216806] ? fsnotify_first_mark+0x2b0/0x2b0 [ 33.216811] ? ep_free+0x320/0x320 [ 33.216814] ep_eventpoll_release+0x44/0x60 [ 33.216817] __fput+0x327/0x7e0 [ 33.216822] ? fput+0x140/0x140 [ 33.216826] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.216830] ____fput+0x15/0x20 [ 33.216834] task_work_run+0x199/0x270 [ 33.216839] ? task_work_cancel+0x210/0x210 [ 33.216842] ? _raw_spin_unlock+0x22/0x30 [ 33.216846] ? switch_task_namespaces+0x87/0xc0 [ 33.216850] do_exit+0x9bb/0x1ad0 [ 33.216854] ? binder_ioctl+0x551/0x1417 [ 33.216858] ? mm_update_next_owner+0x930/0x930 [ 33.216862] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 33.216866] ? avc_ss_reset+0x110/0x110 [ 33.216870] ? mutex_unlock+0xd/0x10 [ 33.216873] ? SyS_epoll_ctl+0x30a/0x1a80 [ 33.216884] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 33.216886] ? up_read+0x1a/0x40 [ 33.216890] ? rcu_note_context_switch+0x710/0x710 [ 33.216893] ? __fd_install+0x288/0x740 [ 33.216898] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 33.216901] ? do_vfs_ioctl+0x486/0x1520 [ 33.216904] ? _cond_resched+0x14/0x30 [ 33.216909] ? ioctl_preallocate+0x2b0/0x2b0 [ 33.216913] ? selinux_capable+0x40/0x40 [ 33.216916] ? __alloc_fd+0x750/0x750 [ 33.216921] do_group_exit+0x149/0x400 [ 33.216925] ? SyS_exit+0x30/0x30 [ 33.216929] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.216933] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.216937] SyS_exit_group+0x1d/0x20 [ 33.216941] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 33.216943] RIP: 0033:0x4429f8 [ 33.216945] RSP: 002b:00007ffee0096c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 33.216948] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 33.216950] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 33.216952] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 33.216954] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 33.216956] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 33.238351] Dumping ftrace buffer: [ 33.238354] (ftrace buffer empty) [ 33.238356] Kernel Offset: disabled [ 34.362855] Rebooting in 86400 seconds..