[....] Starting enhanced syslogd: rsyslogd[ 11.047991] audit: type=1400 audit(1515099874.318:4): avc: denied { syslog } for pid=3173 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.20' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.778291] ================================================================== [ 18.779437] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 18.780349] Read of size 8 at addr ffff8801c9026338 by task syzkaller236428/3321 [ 18.781362] [ 18.781593] CPU: 0 PID: 3321 Comm: syzkaller236428 Not tainted 4.9.74-g173c52e #4 [ 18.782588] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.783807] ffff8801ca1af8e0 ffffffff81d91b09 ffffea0007240980 ffff8801c9026338 [ 18.784945] 0000000000000000 ffff8801c9026338 ffff8801c9026338 ffff8801ca1af918 [ 18.786074] ffffffff8153b503 ffff8801c9026338 0000000000000008 0000000000000000 [ 18.787240] Call Trace: [ 18.787596] [] dump_stack+0xc1/0x128 [ 18.788306] [] print_address_description+0x73/0x280 [ 18.789190] [] kasan_report+0x275/0x360 [ 18.789943] [] ? __lock_acquire+0x2eff/0x3640 [ 18.790759] [] __asan_report_load8_noabort+0x14/0x20 [ 18.791651] [] __lock_acquire+0x2eff/0x3640 [ 18.792448] [] ? __lock_acquire+0x629/0x3640 [ 18.793246] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.794176] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.795095] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.796048] [] ? mark_held_locks+0xaf/0x100 [ 18.796835] [] ? mutex_lock_nested+0x5e3/0x870 [ 18.797654] [] lock_acquire+0x12e/0x410 [ 18.798405] [] ? remove_wait_queue+0x14/0x40 [ 18.803551] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 18.809847] [] ? remove_wait_queue+0x14/0x40 [ 18.815878] [] remove_wait_queue+0x14/0x40 [ 18.821732] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 18.828708] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 18.835954] [] ? ep_free+0x1b0/0x1b0 [ 18.841285] [] ep_free+0x96/0x1b0 [ 18.846353] [] ? ep_free+0x1b0/0x1b0 [ 18.851682] [] ep_eventpoll_release+0x44/0x60 [ 18.857790] [] __fput+0x28c/0x6e0 [ 18.862857] [] ____fput+0x15/0x20 [ 18.867926] [] task_work_run+0x115/0x190 [ 18.873605] [] do_exit+0x7e7/0x2a40 [ 18.878846] [] ? selinux_file_ioctl+0x355/0x530 [ 18.885131] [] ? release_task+0x1240/0x1240 [ 18.891077] [] ? SyS_epoll_create+0x190/0x190 [ 18.897188] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 18.903827] [] do_group_exit+0x108/0x320 [ 18.909505] [] SyS_exit_group+0x1d/0x20 [ 18.915096] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 18.921638] [ 18.923233] Allocated by task 3321: [ 18.926826] save_stack_trace+0x16/0x20 [ 18.930774] save_stack+0x43/0xd0 [ 18.934193] kasan_kmalloc+0xad/0xe0 [ 18.937869] kmem_cache_alloc_trace+0xfb/0x2a0 [ 18.942418] binder_get_thread+0x15d/0x750 [ 18.946614] binder_poll+0x4a/0x210 [ 18.950206] SyS_epoll_ctl+0x11d7/0x2190 [ 18.954232] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 18.958950] [ 18.960545] Freed by task 3321: [ 18.963787] save_stack_trace+0x16/0x20 [ 18.967728] save_stack+0x43/0xd0 [ 18.971146] kasan_slab_free+0x72/0xc0 [ 18.974997] kfree+0x103/0x300 [ 18.978155] binder_thread_dec_tmpref+0x1cc/0x240 [ 18.982963] binder_thread_release+0x27d/0x540 [ 18.987506] binder_ioctl+0x9c0/0x11b0 [ 18.991360] do_vfs_ioctl+0x1aa/0x1140 [ 18.995210] SyS_ioctl+0x8f/0xc0 [ 18.998544] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.003260] [ 19.004856] The buggy address belongs to the object at ffff8801c9026280 [ 19.004856] which belongs to the cache kmalloc-512 of size 512 [ 19.017480] The buggy address is located 184 bytes inside of [ 19.017480] 512-byte region [ffff8801c9026280, ffff8801c9026480) [ 19.029322] The buggy address belongs to the page: [ 19.034218] page:ffffea0007240980 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.044372] flags: 0x8000000000004080(slab|head) [ 19.049100] page dumped because: kasan: bad access detected [ 19.054772] [ 19.056363] Memory state around the buggy address: [ 19.061256] ffff8801c9026200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.068577] ffff8801c9026280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.075901] >ffff8801c9026300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.083224] ^ [ 19.088379] ffff8801c9026380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.095704] ffff8801c9026400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.103034] ================================================================== [ 19.110357] Disabling lock debugging due to kernel taint [ 19.115785] Kernel panic - not syncing: panic_on_warn set ... [ 19.115785] [ 19.123115] CPU: 0 PID: 3321 Comm: syzkaller236428 Tainted: G B 4.9.74-g173c52e #4 [ 19.131911] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.141232] ffff8801ca1af838 ffffffff81d91b09 ffffffff841955df ffff8801ca1af910 [ 19.149198] 0000000000000000 ffff8801c9026338 ffff8801c9026338 ffff8801ca1af900 [ 19.157154] ffffffff8142d161 0000000041b58ab3 ffffffff84189020 ffffffff8142cfa5 [ 19.165102] Call Trace: [ 19.167657] [] dump_stack+0xc1/0x128 [ 19.172987] [] panic+0x1bc/0x3a8 [ 19.177967] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.186160] [] ? add_taint+0x40/0x50 [ 19.191490] [] kasan_end_report+0x50/0x50 [ 19.197252] [] kasan_report+0x167/0x360 [ 19.202849] [] ? __lock_acquire+0x2eff/0x3640 [ 19.208957] [] __asan_report_load8_noabort+0x14/0x20 [ 19.215676] [] __lock_acquire+0x2eff/0x3640 [ 19.221613] [] ? __lock_acquire+0x629/0x3640 [ 19.227647] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.234624] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.241604] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.248589] [] ? mark_held_locks+0xaf/0x100 [ 19.254527] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.260728] [] lock_acquire+0x12e/0x410 [ 19.266320] [] ? remove_wait_queue+0x14/0x40 [ 19.272350] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.278632] [] ? remove_wait_queue+0x14/0x40 [ 19.284654] [] remove_wait_queue+0x14/0x40 [ 19.290506] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.297486] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.304734] [] ? ep_free+0x1b0/0x1b0 [ 19.310069] [] ep_free+0x96/0x1b0 [ 19.315134] [] ? ep_free+0x1b0/0x1b0 [ 19.320469] [] ep_eventpoll_release+0x44/0x60 [ 19.326589] [] __fput+0x28c/0x6e0 [ 19.331656] [] ____fput+0x15/0x20 [ 19.336724] [] task_work_run+0x115/0x190 [ 19.342404] [] do_exit+0x7e7/0x2a40 [ 19.347655] [] ? selinux_file_ioctl+0x355/0x530 [ 19.353946] [] ? release_task+0x1240/0x1240 [ 19.359885] [] ? SyS_epoll_create+0x190/0x190 [ 19.365997] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 19.372628] [] do_group_exit+0x108/0x320 [ 19.378304] [] SyS_exit_group+0x1d/0x20 [ 19.383894] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.390868] Dumping ftrace buffer: [ 19.394374] (ftrace buffer empty) [ 19.398050] Kernel Offset: disabled [ 19.401641] Rebooting in 86400 seconds..