[?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. [ 11.433964] audit: type=1400 audit(1515135190.979:6): avc: denied { map } for pid=3445 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.23' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 31.366029] audit: type=1400 audit(1515135210.911:7): avc: denied { map } for pid=3463 comm="syzkaller058994" path="/root/syzkaller058994095" 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 [ 31.370111] ================================================================== [ 31.370122] BUG: KASAN: use-after-free in __lock_acquire+0x3c41/0x3cf0 [ 31.370125] Read of size 8 at addr ffff8801c8bf1af8 by task syzkaller058994/3463 [ 31.370126] [ 31.370131] CPU: 1 PID: 3463 Comm: syzkaller058994 Not tainted 4.15.0-rc6-next-20180105+ #89 [ 31.370134] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.370135] Call Trace: [ 31.370143] dump_stack+0x137/0x198 [ 31.370147] ? __lock_acquire+0x3c41/0x3cf0 [ 31.370154] print_address_description+0x73/0x250 [ 31.370158] ? __lock_acquire+0x3c41/0x3cf0 [ 31.370161] kasan_report+0x23b/0x360 [ 31.370166] __asan_report_load8_noabort+0x14/0x20 [ 31.370170] __lock_acquire+0x3c41/0x3cf0 [ 31.370176] ? bpf_prog_kallsyms_find+0x39/0x270 [ 31.370180] ? __lock_acquire+0x63e/0x3cf0 [ 31.370185] ? remove_wait_queue+0x24/0x1b0 [ 31.370190] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.370195] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.370201] ? __mutex_lock+0xec/0x1550 [ 31.370207] ? ep_free+0x72/0x230 [ 31.370210] ? save_stack+0x43/0xd0 [ 31.370213] ? __kasan_slab_free+0x11a/0x170 [ 31.370217] ? kasan_slab_free+0xe/0x10 [ 31.370221] lock_acquire+0x16b/0x420 [ 31.370224] ? lock_acquire+0x16b/0x420 [ 31.370228] ? remove_wait_queue+0x24/0x1b0 [ 31.370233] _raw_spin_lock_irqsave+0x96/0xc0 [ 31.370237] ? remove_wait_queue+0x24/0x1b0 [ 31.370241] remove_wait_queue+0x24/0x1b0 [ 31.370246] ep_unregister_pollwait.isra.7+0x9d/0x360 [ 31.370250] ? ep_free+0x230/0x230 [ 31.370253] ep_free+0xae/0x230 [ 31.370257] ? ep_free+0x230/0x230 [ 31.370261] ep_eventpoll_release+0x44/0x60 [ 31.370265] __fput+0x291/0x6e0 [ 31.370270] ____fput+0x15/0x20 [ 31.370274] task_work_run+0x122/0x1a0 [ 31.370280] do_exit+0x7f4/0x2da0 [ 31.370285] ? binder_ioctl_write_read.isra.39+0x8e0/0x8e0 [ 31.370290] ? do_vfs_ioctl+0x439/0xfe0 [ 31.370295] ? mm_update_next_owner+0x690/0x690 [ 31.370298] ? ioctl_preallocate+0x1c0/0x1c0 [ 31.370303] ? __do_page_fault+0x3c3/0xca0 [ 31.370309] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 31.370313] do_group_exit+0x108/0x320 [ 31.370318] SyS_exit_group+0x1d/0x20 [ 31.370322] entry_SYSCALL_64_fastpath+0x23/0x9a [ 31.370325] RIP: 0033:0x4429f8 [ 31.370327] RSP: 002b:00007fffef565308 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 31.370331] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 31.370333] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 31.370335] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 31.370337] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 31.370339] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 31.370343] [ 31.370345] Allocated by task 3463: [ 31.370349] save_stack+0x43/0xd0 [ 31.370352] kasan_kmalloc+0xad/0xe0 [ 31.370355] kmem_cache_alloc_trace+0x136/0x750 [ 31.370358] binder_get_thread+0x15d/0x700 [ 31.370360] binder_poll+0x4a/0x210 [ 31.370363] ep_item_poll.isra.10+0xf2/0x320 [ 31.370367] SyS_epoll_ctl+0x11c4/0x27b0 [ 31.370370] entry_SYSCALL_64_fastpath+0x23/0x9a [ 31.370371] [ 31.370372] Freed by task 3463: [ 31.370375] save_stack+0x43/0xd0 [ 31.370378] __kasan_slab_free+0x11a/0x170 [ 31.370381] kasan_slab_free+0xe/0x10 [ 31.370384] kfree+0xd9/0x260 [ 31.370387] binder_thread_dec_tmpref+0x17d/0x1e0 [ 31.370390] binder_thread_release+0x27d/0x540 [ 31.370393] binder_ioctl+0xa1b/0x10ee [ 31.370395] do_vfs_ioctl+0x190/0xfe0 [ 31.370398] SyS_ioctl+0x8f/0xc0 [ 31.370402] entry_SYSCALL_64_fastpath+0x23/0x9a [ 31.370402] [ 31.370405] The buggy address belongs to the object at ffff8801c8bf1a40 [ 31.370405] which belongs to the cache kmalloc-512 of size 512 [ 31.370408] The buggy address is located 184 bytes inside of [ 31.370408] 512-byte region [ffff8801c8bf1a40, ffff8801c8bf1c40) [ 31.370409] The buggy address belongs to the page: [ 31.370412] page:ffffea000722fc40 count:1 mapcount:0 mapping:ffff8801c8bf1040 index:0x0 [ 31.370416] flags: 0x2fffc0000000100(slab) [ 31.370421] raw: 02fffc0000000100 ffff8801c8bf1040 0000000000000000 0000000100000006 [ 31.370425] raw: ffffea0007398fe0 ffffea0007391720 ffff8801db000940 0000000000000000 [ 31.370427] page dumped because: kasan: bad access detected [ 31.370427] [ 31.370428] Memory state around the buggy address: [ 31.370431] ffff8801c8bf1980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 31.370434] ffff8801c8bf1a00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 31.370436] >ffff8801c8bf1a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.370438] ^ [ 31.370440] ffff8801c8bf1b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.370443] ffff8801c8bf1b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.370444] ================================================================== [ 31.370445] Disabling lock debugging due to kernel taint [ 31.370447] Kernel panic - not syncing: panic_on_warn set ... [ 31.370447] [ 31.370450] CPU: 1 PID: 3463 Comm: syzkaller058994 Tainted: G B 4.15.0-rc6-next-20180105+ #89 [ 31.370452] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.370453] Call Trace: [ 31.370457] dump_stack+0x137/0x198 [ 31.370461] ? __lock_acquire+0x3b60/0x3cf0 [ 31.370465] panic+0x1e4/0x41c [ 31.370468] ? refcount_error_report+0x214/0x214 [ 31.370472] ? add_taint+0x40/0x50 [ 31.370475] ? add_taint+0x1c/0x50 [ 31.370479] ? __lock_acquire+0x3c41/0x3cf0 [ 31.370483] kasan_end_report+0x50/0x50 [ 31.370486] kasan_report+0x148/0x360 [ 31.370491] __asan_report_load8_noabort+0x14/0x20 [ 31.370494] __lock_acquire+0x3c41/0x3cf0 [ 31.370499] ? bpf_prog_kallsyms_find+0x39/0x270 [ 31.370503] ? __lock_acquire+0x63e/0x3cf0 [ 31.370506] ? remove_wait_queue+0x24/0x1b0 [ 31.370511] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.370516] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 31.370521] ? __mutex_lock+0xec/0x1550 [ 31.370524] ? ep_free+0x72/0x230 [ 31.370531] ? save_stack+0x43/0xd0 [ 31.370535] ? __kasan_slab_free+0x11a/0x170 [ 31.370538] ? kasan_slab_free+0xe/0x10 [ 31.370543] lock_acquire+0x16b/0x420 [ 31.370548] ? lock_acquire+0x16b/0x420 [ 31.370553] ? remove_wait_queue+0x24/0x1b0 [ 31.370561] _raw_spin_lock_irqsave+0x96/0xc0 [ 31.370565] ? remove_wait_queue+0x24/0x1b0 [ 31.370569] remove_wait_queue+0x24/0x1b0 [ 31.370574] ep_unregister_pollwait.isra.7+0x9d/0x360 [ 31.370578] ? ep_free+0x230/0x230 [ 31.370582] ep_free+0xae/0x230 [ 31.370585] ? ep_free+0x230/0x230 [ 31.370589] ep_eventpoll_release+0x44/0x60 [ 31.370592] __fput+0x291/0x6e0 [ 31.370596] ____fput+0x15/0x20 [ 31.370599] task_work_run+0x122/0x1a0 [ 31.370604] do_exit+0x7f4/0x2da0 [ 31.370607] ? binder_ioctl_write_read.isra.39+0x8e0/0x8e0 [ 31.370611] ? do_vfs_ioctl+0x439/0xfe0 [ 31.370615] ? mm_update_next_owner+0x690/0x690 [ 31.370619] ? ioctl_preallocate+0x1c0/0x1c0 [ 31.370623] ? __do_page_fault+0x3c3/0xca0 [ 31.370628] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 31.370633] do_group_exit+0x108/0x320 [ 31.370637] SyS_exit_group+0x1d/0x20 [ 31.370641] entry_SYSCALL_64_fastpath+0x23/0x9a [ 31.370643] RIP: 0033:0x4429f8 [ 31.370645] RSP: 002b:00007fffef565308 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 31.370649] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 31.370650] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 31.370652] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 31.370654] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 31.370656] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 31.392258] Dumping ftrace buffer: [ 31.392261] (ftrace buffer empty) [ 31.392263] Kernel Offset: disabled [ 32.134132] Rebooting in 86400 seconds..