[....] Starting enhanced syslogd: rsyslogd[ 12.970498] audit: type=1400 audit(1517303310.239:4): avc: denied { syslog } for pid=3860 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?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 Warning: Permanently added '10.128.0.14' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.872331] ================================================================== [ 32.879709] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 32.886343] Read of size 8 at addr ffff8801ca810fb8 by task syzkaller429934/4022 [ 32.893849] [ 32.895452] CPU: 0 PID: 4022 Comm: syzkaller429934 Not tainted 4.9.78-g7be1985 #24 [ 32.903133] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.912463] ffff8801d46b78e0 ffffffff81d94409 ffffea00072a0400 ffff8801ca810fb8 [ 32.920443] 0000000000000000 ffff8801ca810fb8 ffff8801ca810fb8 ffff8801d46b7918 [ 32.928412] ffffffff8153dc73 ffff8801ca810fb8 0000000000000008 0000000000000000 [ 32.936372] Call Trace: [ 32.938929] [] dump_stack+0xc1/0x128 [ 32.944264] [] print_address_description+0x73/0x280 [ 32.950907] [] kasan_report+0x275/0x360 [ 32.956502] [] ? __lock_acquire+0x2eff/0x3640 [ 32.962619] [] __asan_report_load8_noabort+0x14/0x20 [ 32.969351] [] __lock_acquire+0x2eff/0x3640 [ 32.975291] [] ? __lock_acquire+0x629/0x3640 [ 32.981325] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.988306] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.995284] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 33.002264] [] ? mark_held_locks+0xaf/0x100 [ 33.008204] [] ? mutex_lock_nested+0x5e3/0x870 [ 33.014402] [] lock_acquire+0x12e/0x410 [ 33.019995] [] ? remove_wait_queue+0x14/0x40 [ 33.026021] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 33.032304] [] ? remove_wait_queue+0x14/0x40 [ 33.038329] [] remove_wait_queue+0x14/0x40 [ 33.044183] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 33.051164] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 33.058404] [] ? ep_free+0x1b0/0x1b0 [ 33.063739] [] ep_free+0x96/0x1b0 [ 33.068813] [] ? ep_free+0x1b0/0x1b0 [ 33.074144] [] ep_eventpoll_release+0x44/0x60 [ 33.080431] [] __fput+0x28c/0x6e0 [ 33.085513] [] ____fput+0x15/0x20 [ 33.090588] [] task_work_run+0x115/0x190 [ 33.096281] [] do_exit+0x7e7/0x2a40 [ 33.101529] [] ? selinux_file_ioctl+0x355/0x530 [ 33.107819] [] ? release_task+0x1240/0x1240 [ 33.113759] [] ? SyS_epoll_create+0x190/0x190 [ 33.119875] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 33.126511] [] do_group_exit+0x108/0x320 [ 33.132189] [] SyS_exit_group+0x1d/0x20 [ 33.137782] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 33.144335] [ 33.145932] Allocated by task 4022: [ 33.149526] save_stack_trace+0x16/0x20 [ 33.153483] save_stack+0x43/0xd0 [ 33.156909] kasan_kmalloc+0xad/0xe0 [ 33.160590] kmem_cache_alloc_trace+0xfb/0x2a0 [ 33.165139] binder_get_thread+0x15d/0x750 [ 33.169346] binder_poll+0x4a/0x210 [ 33.172960] SyS_epoll_ctl+0x11d7/0x2190 [ 33.176990] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 33.181712] [ 33.183308] Freed by task 4022: [ 33.186556] save_stack_trace+0x16/0x20 [ 33.190496] save_stack+0x43/0xd0 [ 33.193917] kasan_slab_free+0x72/0xc0 [ 33.197770] kfree+0x103/0x300 [ 33.200940] binder_thread_dec_tmpref+0x1cc/0x240 [ 33.205750] binder_thread_release+0x27d/0x540 [ 33.210307] binder_ioctl+0x9c0/0x11b0 [ 33.214162] do_vfs_ioctl+0x1aa/0x1140 [ 33.218017] SyS_ioctl+0x8f/0xc0 [ 33.221351] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 33.226070] [ 33.227666] The buggy address belongs to the object at ffff8801ca810f00 [ 33.227666] which belongs to the cache kmalloc-512 of size 512 [ 33.240287] The buggy address is located 184 bytes inside of [ 33.240287] 512-byte region [ffff8801ca810f00, ffff8801ca811100) [ 33.252129] The buggy address belongs to the page: [ 33.257026] page:ffffea00072a0400 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 33.267197] flags: 0x8000000000004080(slab|head) [ 33.271922] page dumped because: kasan: bad access detected [ 33.277613] [ 33.279210] Memory state around the buggy address: [ 33.284118] ffff8801ca810e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.291445] ffff8801ca810f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.298773] >ffff8801ca810f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.306100] ^ [ 33.311258] ffff8801ca811000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.318588] ffff8801ca811080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.325912] ================================================================== [ 33.333235] Disabling lock debugging due to kernel taint [ 33.338654] Kernel panic - not syncing: panic_on_warn set ... [ 33.338654] [ 33.345988] CPU: 0 PID: 4022 Comm: syzkaller429934 Tainted: G B 4.9.78-g7be1985 #24 [ 33.354877] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.364199] ffff8801d46b7838 ffffffff81d94409 ffffffff841971bf ffff8801d46b7910 [ 33.372165] 0000000000000000 ffff8801ca810fb8 ffff8801ca810fb8 ffff8801d46b7900 [ 33.380124] ffffffff8142f4a1 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f2e5 [ 33.388113] Call Trace: [ 33.390676] [] dump_stack+0xc1/0x128 [ 33.396009] [] panic+0x1bc/0x3a8 [ 33.401003] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 33.409202] [] ? add_taint+0x40/0x50 [ 33.414539] [] kasan_end_report+0x50/0x50 [ 33.420305] [] kasan_report+0x167/0x360 [ 33.425903] [] ? __lock_acquire+0x2eff/0x3640 [ 33.432015] [] __asan_report_load8_noabort+0x14/0x20 [ 33.438739] [] __lock_acquire+0x2eff/0x3640 [ 33.444678] [] ? __lock_acquire+0x629/0x3640 [ 33.450704] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 33.457694] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 33.464675] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 33.471656] [] ? mark_held_locks+0xaf/0x100 [ 33.477596] [] ? mutex_lock_nested+0x5e3/0x870 [ 33.483794] [] lock_acquire+0x12e/0x410 [ 33.489387] [] ? remove_wait_queue+0x14/0x40 [ 33.495422] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 33.501708] [] ? remove_wait_queue+0x14/0x40 [ 33.507736] [] remove_wait_queue+0x14/0x40 [ 33.513599] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 33.520580] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 33.527823] [] ? ep_free+0x1b0/0x1b0 [ 33.533161] [] ep_free+0x96/0x1b0 [ 33.538232] [] ? ep_free+0x1b0/0x1b0 [ 33.543563] [] ep_eventpoll_release+0x44/0x60 [ 33.549676] [] __fput+0x28c/0x6e0 [ 33.554753] [] ____fput+0x15/0x20 [ 33.559834] [] task_work_run+0x115/0x190 [ 33.565513] [] do_exit+0x7e7/0x2a40 [ 33.570757] [] ? selinux_file_ioctl+0x355/0x530 [ 33.577044] [] ? release_task+0x1240/0x1240 [ 33.582981] [] ? SyS_epoll_create+0x190/0x190 [ 33.589095] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 33.595739] [] do_group_exit+0x108/0x320 [ 33.601426] [] SyS_exit_group+0x1d/0x20 [ 33.607020] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 33.613929] Dumping ftrace buffer: [ 33.617438] (ftrace buffer empty) [ 33.621119] Kernel Offset: disabled [ 33.624711] Rebooting in 86400 seconds..