[?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. [ 12.256385] audit: type=1400 audit(1515330116.724:6): avc: denied { map } for pid=3452 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.62' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.816968] audit: type=1400 audit(1515330130.284:7): avc: denied { map } for pid=3468 comm="syzkaller187455" path="/root/syzkaller187455485" 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.822072] ================================================================== [ 25.822083] BUG: KASAN: use-after-free in __lock_acquire+0x3c41/0x3cf0 [ 25.822087] Read of size 8 at addr ffff8801cae9f878 by task syzkaller187455/3468 [ 25.822088] [ 25.822092] CPU: 1 PID: 3468 Comm: syzkaller187455 Not tainted 4.15.0-rc6-mm1+ #51 [ 25.822095] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.822096] Call Trace: [ 25.822103] dump_stack+0x137/0x198 [ 25.822108] ? __lock_acquire+0x3c41/0x3cf0 [ 25.822114] print_address_description+0x73/0x250 [ 25.822118] ? __lock_acquire+0x3c41/0x3cf0 [ 25.822122] kasan_report+0x23b/0x360 [ 25.822127] __asan_report_load8_noabort+0x14/0x20 [ 25.822130] __lock_acquire+0x3c41/0x3cf0 [ 25.822137] ? bpf_prog_kallsyms_find+0x39/0x270 [ 25.822141] ? __lock_acquire+0x63e/0x3cf0 [ 25.822146] ? remove_wait_queue+0x24/0x1b0 [ 25.822151] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.822156] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.822162] ? __mutex_lock+0xec/0x1550 [ 25.822169] ? ep_free+0x72/0x230 [ 25.822172] ? save_stack+0x43/0xd0 [ 25.822175] ? __kasan_slab_free+0x11a/0x170 [ 25.822179] ? kasan_slab_free+0xe/0x10 [ 25.822183] lock_acquire+0x16b/0x420 [ 25.822186] ? lock_acquire+0x16b/0x420 [ 25.822190] ? remove_wait_queue+0x24/0x1b0 [ 25.822195] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.822199] ? remove_wait_queue+0x24/0x1b0 [ 25.822203] remove_wait_queue+0x24/0x1b0 [ 25.822208] ep_unregister_pollwait.isra.7+0x9d/0x360 [ 25.822212] ? ep_free+0x230/0x230 [ 25.822215] ep_free+0xae/0x230 [ 25.822219] ? ep_free+0x230/0x230 [ 25.822223] ep_eventpoll_release+0x44/0x60 [ 25.822227] __fput+0x291/0x6e0 [ 25.822231] ____fput+0x15/0x20 [ 25.822235] task_work_run+0x122/0x1a0 [ 25.822241] do_exit+0x7f4/0x2da0 [ 25.822247] ? binder_ioctl_write_read.isra.39+0x8e0/0x8e0 [ 25.822252] ? do_vfs_ioctl+0x439/0xfe0 [ 25.822257] ? mm_update_next_owner+0x690/0x690 [ 25.822260] ? ioctl_preallocate+0x1c0/0x1c0 [ 25.822265] ? __do_page_fault+0x3c3/0xca0 [ 25.822271] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 25.822276] do_group_exit+0x108/0x320 [ 25.822280] SyS_exit_group+0x1d/0x20 [ 25.822284] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.822287] RIP: 0033:0x4429f8 [ 25.822289] RSP: 002b:00007ffdf2c22808 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.822293] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.822295] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.822297] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.822299] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.822301] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.822305] [ 25.822307] Allocated by task 3468: [ 25.822311] save_stack+0x43/0xd0 [ 25.822314] kasan_kmalloc+0xad/0xe0 [ 25.822317] kmem_cache_alloc_trace+0x136/0x750 [ 25.822320] binder_get_thread+0x15d/0x700 [ 25.822323] binder_poll+0x4a/0x210 [ 25.822326] ep_item_poll.isra.10+0xf2/0x320 [ 25.822330] SyS_epoll_ctl+0x11c4/0x27b0 [ 25.822333] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.822334] [ 25.822335] Freed by task 3468: [ 25.822338] save_stack+0x43/0xd0 [ 25.822341] __kasan_slab_free+0x11a/0x170 [ 25.822344] kasan_slab_free+0xe/0x10 [ 25.822347] kfree+0xd9/0x260 [ 25.822350] binder_thread_dec_tmpref+0x17d/0x1e0 [ 25.822352] binder_thread_release+0x27d/0x540 [ 25.822355] binder_ioctl+0xa1b/0x10ee [ 25.822358] do_vfs_ioctl+0x190/0xfe0 [ 25.822361] SyS_ioctl+0x8f/0xc0 [ 25.822364] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.822365] [ 25.822367] The buggy address belongs to the object at ffff8801cae9f7c0 [ 25.822367] which belongs to the cache kmalloc-512 of size 512 [ 25.822370] The buggy address is located 184 bytes inside of [ 25.822370] 512-byte region [ffff8801cae9f7c0, ffff8801cae9f9c0) [ 25.822371] The buggy address belongs to the page: [ 25.822374] page:ffffea00072ba7c0 count:1 mapcount:0 mapping:ffff8801cae9f040 index:0x0 [ 25.822377] flags: 0x2fffc0000000100(slab) [ 25.822383] raw: 02fffc0000000100 ffff8801cae9f040 0000000000000000 0000000100000006 [ 25.822387] raw: ffffea0007257fa0 ffffea000728fc60 ffff8801db000940 0000000000000000 [ 25.822389] page dumped because: kasan: bad access detected [ 25.822389] [ 25.822390] Memory state around the buggy address: [ 25.822393] ffff8801cae9f700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 25.822395] ffff8801cae9f780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 25.822398] >ffff8801cae9f800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.822399] ^ [ 25.822402] ffff8801cae9f880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.822404] ffff8801cae9f900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.822405] ================================================================== [ 25.822406] Disabling lock debugging due to kernel taint [ 25.822408] Kernel panic - not syncing: panic_on_warn set ... [ 25.822408] [ 25.822412] CPU: 1 PID: 3468 Comm: syzkaller187455 Tainted: G B 4.15.0-rc6-mm1+ #51 [ 25.822414] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.822415] Call Trace: [ 25.822419] dump_stack+0x137/0x198 [ 25.822423] ? __lock_acquire+0x3bc0/0x3cf0 [ 25.822426] panic+0x1e4/0x41c [ 25.822430] ? refcount_error_report+0x214/0x214 [ 25.822434] ? add_taint+0x40/0x50 [ 25.822437] ? add_taint+0x1c/0x50 [ 25.822441] ? __lock_acquire+0x3c41/0x3cf0 [ 25.822444] kasan_end_report+0x50/0x50 [ 25.822448] kasan_report+0x148/0x360 [ 25.822453] __asan_report_load8_noabort+0x14/0x20 [ 25.822456] __lock_acquire+0x3c41/0x3cf0 [ 25.822460] ? bpf_prog_kallsyms_find+0x39/0x270 [ 25.822464] ? __lock_acquire+0x63e/0x3cf0 [ 25.822468] ? remove_wait_queue+0x24/0x1b0 [ 25.822473] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.822478] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.822482] ? __mutex_lock+0xec/0x1550 [ 25.822485] ? ep_free+0x72/0x230 [ 25.822489] ? save_stack+0x43/0xd0 [ 25.822492] ? __kasan_slab_free+0x11a/0x170 [ 25.822495] ? kasan_slab_free+0xe/0x10 [ 25.822499] lock_acquire+0x16b/0x420 [ 25.822502] ? lock_acquire+0x16b/0x420 [ 25.822506] ? remove_wait_queue+0x24/0x1b0 [ 25.822511] _raw_spin_lock_irqsave+0x96/0xc0 [ 25.822515] ? remove_wait_queue+0x24/0x1b0 [ 25.822518] remove_wait_queue+0x24/0x1b0 [ 25.822523] ep_unregister_pollwait.isra.7+0x9d/0x360 [ 25.822527] ? ep_free+0x230/0x230 [ 25.822531] ep_free+0xae/0x230 [ 25.822534] ? ep_free+0x230/0x230 [ 25.822538] ep_eventpoll_release+0x44/0x60 [ 25.822541] __fput+0x291/0x6e0 [ 25.822545] ____fput+0x15/0x20 [ 25.822548] task_work_run+0x122/0x1a0 [ 25.822553] do_exit+0x7f4/0x2da0 [ 25.822556] ? binder_ioctl_write_read.isra.39+0x8e0/0x8e0 [ 25.822560] ? do_vfs_ioctl+0x439/0xfe0 [ 25.822564] ? mm_update_next_owner+0x690/0x690 [ 25.822568] ? ioctl_preallocate+0x1c0/0x1c0 [ 25.822572] ? __do_page_fault+0x3c3/0xca0 [ 25.822577] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 25.822582] do_group_exit+0x108/0x320 [ 25.822586] SyS_exit_group+0x1d/0x20 [ 25.822590] entry_SYSCALL_64_fastpath+0x23/0x9a [ 25.822592] RIP: 0033:0x4429f8 [ 25.822594] RSP: 002b:00007ffdf2c22808 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 25.822597] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 25.822599] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 25.822601] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 25.822603] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 25.822605] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 25.843286] Dumping ftrace buffer: [ 25.843289] (ftrace buffer empty) [ 25.843292] Kernel Offset: disabled [ 26.583453] Rebooting in 86400 seconds..