[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [ 12.215549] audit: type=1400 audit(1515074491.450:6): avc: denied { map } for pid=3454 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.38' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.473445] audit: type=1400 audit(1515074497.708:7): avc: denied { map } for pid=3468 comm="syzkaller033368" path="/root/syzkaller033368279" 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 [ 18.477699] ================================================================== [ 18.477714] BUG: KASAN: use-after-free in __lock_acquire+0x3c41/0x3cf0 [ 18.477719] Read of size 8 at addr ffff8801ce6ac878 by task syzkaller033368/3468 [ 18.477720] [ 18.477728] CPU: 0 PID: 3468 Comm: syzkaller033368 Not tainted 4.15.0-rc6-mm1+ #50 [ 18.477731] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.477733] Call Trace: [ 18.477742] dump_stack+0x137/0x198 [ 18.477749] ? __lock_acquire+0x3c41/0x3cf0 [ 18.477758] print_address_description+0x73/0x250 [ 18.477764] ? __lock_acquire+0x3c41/0x3cf0 [ 18.477771] kasan_report+0x23b/0x360 [ 18.477779] __asan_report_load8_noabort+0x14/0x20 [ 18.477784] __lock_acquire+0x3c41/0x3cf0 [ 18.477794] ? bpf_prog_kallsyms_find+0x39/0x270 [ 18.477801] ? __lock_acquire+0x63e/0x3cf0 [ 18.477808] ? remove_wait_queue+0x24/0x1b0 [ 18.477816] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.477825] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.477834] ? __mutex_lock+0xec/0x1550 [ 18.477842] ? ep_free+0x72/0x230 [ 18.477847] ? save_stack+0x43/0xd0 [ 18.477852] ? __kasan_slab_free+0x11a/0x170 [ 18.477858] ? kasan_slab_free+0xe/0x10 [ 18.477865] lock_acquire+0x16b/0x420 [ 18.477870] ? lock_acquire+0x16b/0x420 [ 18.477876] ? remove_wait_queue+0x24/0x1b0 [ 18.477885] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.477890] ? remove_wait_queue+0x24/0x1b0 [ 18.477897] remove_wait_queue+0x24/0x1b0 [ 18.477905] ep_unregister_pollwait.isra.7+0x9d/0x360 [ 18.477913] ? ep_free+0x230/0x230 [ 18.477918] ep_free+0xae/0x230 [ 18.477924] ? ep_free+0x230/0x230 [ 18.477930] ep_eventpoll_release+0x44/0x60 [ 18.477936] __fput+0x291/0x6e0 [ 18.477943] ____fput+0x15/0x20 [ 18.477949] task_work_run+0x122/0x1a0 [ 18.477957] do_exit+0x7f4/0x2da0 [ 18.477965] ? binder_ioctl_write_read.isra.39+0x8e0/0x8e0 [ 18.477972] ? do_vfs_ioctl+0x439/0xfe0 [ 18.477979] ? mm_update_next_owner+0x690/0x690 [ 18.477985] ? ioctl_preallocate+0x1c0/0x1c0 [ 18.477992] ? __do_page_fault+0x3c3/0xca0 [ 18.478006] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 18.478013] do_group_exit+0x108/0x320 [ 18.478021] SyS_exit_group+0x1d/0x20 [ 18.478027] entry_SYSCALL_64_fastpath+0x23/0x9a [ 18.478032] RIP: 0033:0x4429f8 [ 18.478035] RSP: 002b:00007fffd6e43b08 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 18.478041] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 18.478045] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 18.478048] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 18.478052] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 18.478055] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 18.478067] [ 18.478069] Allocated by task 3468: [ 18.478075] save_stack+0x43/0xd0 [ 18.478080] kasan_kmalloc+0xad/0xe0 [ 18.478085] kmem_cache_alloc_trace+0x136/0x750 [ 18.478090] binder_get_thread+0x15d/0x700 [ 18.478094] binder_poll+0x4a/0x210 [ 18.478099] ep_item_poll.isra.10+0xf2/0x320 [ 18.478104] SyS_epoll_ctl+0x11c4/0x27b0 [ 18.478110] entry_SYSCALL_64_fastpath+0x23/0x9a [ 18.478111] [ 18.478113] Freed by task 3468: [ 18.478118] save_stack+0x43/0xd0 [ 18.478123] __kasan_slab_free+0x11a/0x170 [ 18.478128] kasan_slab_free+0xe/0x10 [ 18.478132] kfree+0xd9/0x260 [ 18.478137] binder_thread_dec_tmpref+0x17d/0x1e0 [ 18.478141] binder_thread_release+0x27d/0x540 [ 18.478145] binder_ioctl+0xa1b/0x10ee [ 18.478150] do_vfs_ioctl+0x190/0xfe0 [ 18.478154] SyS_ioctl+0x8f/0xc0 [ 18.478160] entry_SYSCALL_64_fastpath+0x23/0x9a [ 18.478161] [ 18.478164] The buggy address belongs to the object at ffff8801ce6ac7c0 [ 18.478164] which belongs to the cache kmalloc-512 of size 512 [ 18.478169] The buggy address is located 184 bytes inside of [ 18.478169] 512-byte region [ffff8801ce6ac7c0, ffff8801ce6ac9c0) [ 18.478171] The buggy address belongs to the page: [ 18.478175] page:ffffea000739ab00 count:1 mapcount:0 mapping:ffff8801ce6ac040 index:0x0 [ 18.478181] flags: 0x2fffc0000000100(slab) [ 18.478189] raw: 02fffc0000000100 ffff8801ce6ac040 0000000000000000 0000000100000006 [ 18.478196] raw: ffffea00073767e0 ffffea0007393a20 ffff8801db000940 0000000000000000 [ 18.478198] page dumped because: kasan: bad access detected [ 18.478199] [ 18.478200] Memory state around the buggy address: [ 18.478205] ffff8801ce6ac700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 18.478209] ffff8801ce6ac780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 18.478214] >ffff8801ce6ac800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.478216] ^ [ 18.478220] ffff8801ce6ac880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.478225] ffff8801ce6ac900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.478226] ================================================================== [ 18.478228] Disabling lock debugging due to kernel taint [ 18.478231] Kernel panic - not syncing: panic_on_warn set ... [ 18.478231] [ 18.478237] CPU: 0 PID: 3468 Comm: syzkaller033368 Tainted: G B 4.15.0-rc6-mm1+ #50 [ 18.478240] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.478241] Call Trace: [ 18.478247] dump_stack+0x137/0x198 [ 18.478254] ? __lock_acquire+0x3bc0/0x3cf0 [ 18.478259] panic+0x1e4/0x41c [ 18.478265] ? refcount_error_report+0x214/0x214 [ 18.478271] ? add_taint+0x40/0x50 [ 18.478276] ? add_taint+0x1c/0x50 [ 18.478283] ? __lock_acquire+0x3c41/0x3cf0 [ 18.478289] kasan_end_report+0x50/0x50 [ 18.478295] kasan_report+0x148/0x360 [ 18.478302] __asan_report_load8_noabort+0x14/0x20 [ 18.478308] __lock_acquire+0x3c41/0x3cf0 [ 18.478315] ? bpf_prog_kallsyms_find+0x39/0x270 [ 18.478322] ? __lock_acquire+0x63e/0x3cf0 [ 18.478327] ? remove_wait_queue+0x24/0x1b0 [ 18.478336] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.478344] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 18.478351] ? __mutex_lock+0xec/0x1550 [ 18.478357] ? ep_free+0x72/0x230 [ 18.478362] ? save_stack+0x43/0xd0 [ 18.478367] ? __kasan_slab_free+0x11a/0x170 [ 18.478373] ? kasan_slab_free+0xe/0x10 [ 18.478379] lock_acquire+0x16b/0x420 [ 18.478385] ? lock_acquire+0x16b/0x420 [ 18.478391] ? remove_wait_queue+0x24/0x1b0 [ 18.478399] _raw_spin_lock_irqsave+0x96/0xc0 [ 18.478405] ? remove_wait_queue+0x24/0x1b0 [ 18.478412] remove_wait_queue+0x24/0x1b0 [ 18.478419] ep_unregister_pollwait.isra.7+0x9d/0x360 [ 18.478427] ? ep_free+0x230/0x230 [ 18.478432] ep_free+0xae/0x230 [ 18.478439] ? ep_free+0x230/0x230 [ 18.478444] ep_eventpoll_release+0x44/0x60 [ 18.478449] __fput+0x291/0x6e0 [ 18.478457] ____fput+0x15/0x20 [ 18.478462] task_work_run+0x122/0x1a0 [ 18.478469] do_exit+0x7f4/0x2da0 [ 18.478476] ? binder_ioctl_write_read.isra.39+0x8e0/0x8e0 [ 18.478482] ? do_vfs_ioctl+0x439/0xfe0 [ 18.478489] ? mm_update_next_owner+0x690/0x690 [ 18.478495] ? ioctl_preallocate+0x1c0/0x1c0 [ 18.478501] ? __do_page_fault+0x3c3/0xca0 [ 18.478510] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 18.478517] do_group_exit+0x108/0x320 [ 18.478524] SyS_exit_group+0x1d/0x20 [ 18.478530] entry_SYSCALL_64_fastpath+0x23/0x9a [ 18.478534] RIP: 0033:0x4429f8 [ 18.478537] RSP: 002b:00007fffd6e43b08 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 18.478542] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 18.478545] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 18.478549] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 18.478552] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 18.478555] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 18.499766] Dumping ftrace buffer: [ 18.499769] (ftrace buffer empty) [ 18.499771] Kernel Offset: disabled [ 19.240417] Rebooting in 86400 seconds..