[....] Starting enhanced syslogd: rsyslogd[ 10.083722] audit: type=1400 audit(1514841350.972:4): avc: denied { syslog } for pid=3169 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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.54' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.487468] ================================================================== [ 19.488566] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.489441] Read of size 8 at addr ffff8801cc1019b8 by task syzkaller515394/3323 [ 19.490486] [ 19.490719] CPU: 0 PID: 3323 Comm: syzkaller515394 Not tainted 4.9.73-gf3f3457 #1 [ 19.491713] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.492929] ffff8801cb0cf8e0 ffffffff81d922b9 ffffea0007304000 ffff8801cc1019b8 [ 19.494060] 0000000000000000 ffff8801cc1019b8 ffff8801cc1019b8 ffff8801cb0cf918 [ 19.495183] ffffffff8153bab3 ffff8801cc1019b8 0000000000000008 0000000000000000 [ 19.496306] Call Trace: [ 19.496661] [] dump_stack+0xc1/0x128 [ 19.497386] [] print_address_description+0x73/0x280 [ 19.498281] [] kasan_report+0x275/0x360 [ 19.499022] [] ? __lock_acquire+0x2eff/0x3640 [ 19.499828] [] __asan_report_load8_noabort+0x14/0x20 [ 19.500712] [] __lock_acquire+0x2eff/0x3640 [ 19.501496] [] ? __lock_acquire+0x629/0x3640 [ 19.502293] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.503226] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.504144] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.505061] [] ? mark_held_locks+0xaf/0x100 [ 19.505856] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.506710] [] lock_acquire+0x12e/0x410 [ 19.507465] [] ? remove_wait_queue+0x14/0x40 [ 19.508276] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.514568] [] ? remove_wait_queue+0x14/0x40 [ 19.520590] [] remove_wait_queue+0x14/0x40 [ 19.526438] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.533418] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.540655] [] ? ep_free+0x1b0/0x1b0 [ 19.545980] [] ep_free+0x96/0x1b0 [ 19.551045] [] ? ep_free+0x1b0/0x1b0 [ 19.556373] [] ep_eventpoll_release+0x44/0x60 [ 19.562480] [] __fput+0x28c/0x6e0 [ 19.567545] [] ____fput+0x15/0x20 [ 19.572613] [] task_work_run+0x115/0x190 [ 19.578286] [] do_exit+0x7e7/0x2a40 [ 19.584571] [] ? selinux_file_ioctl+0x355/0x530 [ 19.590851] [] ? release_task+0x1240/0x1240 [ 19.596785] [] ? SyS_epoll_create+0x190/0x190 [ 19.602893] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 19.609523] [] do_group_exit+0x108/0x320 [ 19.615201] [] SyS_exit_group+0x1d/0x20 [ 19.620787] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.627328] [ 19.628922] Allocated by task 3323: [ 19.632512] save_stack_trace+0x16/0x20 [ 19.636448] save_stack+0x43/0xd0 [ 19.639861] kasan_kmalloc+0xad/0xe0 [ 19.643535] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.648082] binder_get_thread+0x15d/0x750 [ 19.652280] binder_poll+0x4a/0x210 [ 19.655868] SyS_epoll_ctl+0x11d7/0x2190 [ 19.659892] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.664607] [ 19.666199] Freed by task 3323: [ 19.669441] save_stack_trace+0x16/0x20 [ 19.673376] save_stack+0x43/0xd0 [ 19.676792] kasan_slab_free+0x72/0xc0 [ 19.680641] kfree+0x103/0x300 [ 19.683797] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.688604] binder_thread_release+0x27d/0x540 [ 19.693147] binder_ioctl+0x9c0/0x11b0 [ 19.696996] do_vfs_ioctl+0x1aa/0x1140 [ 19.700845] SyS_ioctl+0x8f/0xc0 [ 19.704173] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.708890] [ 19.710480] The buggy address belongs to the object at ffff8801cc101900 [ 19.710480] which belongs to the cache kmalloc-512 of size 512 [ 19.723361] The buggy address is located 184 bytes inside of [ 19.723361] 512-byte region [ffff8801cc101900, ffff8801cc101b00) [ 19.736847] The buggy address belongs to the page: [ 19.741739] page:ffffea0007304000 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.751890] flags: 0x8000000000004080(slab|head) [ 19.756606] page dumped because: kasan: bad access detected [ 19.762276] [ 19.763866] Memory state around the buggy address: [ 19.768757] ffff8801cc101880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.776080] ffff8801cc101900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.783399] >ffff8801cc101980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.790718] ^ [ 19.795870] ffff8801cc101a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.803192] ffff8801cc101a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.810512] ================================================================== [ 19.817832] Disabling lock debugging due to kernel taint [ 19.823248] Kernel panic - not syncing: panic_on_warn set ... [ 19.823248] [ 19.830574] CPU: 0 PID: 3323 Comm: syzkaller515394 Tainted: G B 4.9.73-gf3f3457 #1 [ 19.839368] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.848687] ffff8801cb0cf838 ffffffff81d922b9 ffffffff841955bf ffff8801cb0cf910 [ 19.856627] 0000000000000000 ffff8801cc1019b8 ffff8801cc1019b8 ffff8801cb0cf900 [ 19.864583] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 19.872523] Call Trace: [ 19.875077] [] dump_stack+0xc1/0x128 [ 19.880410] [] panic+0x1bc/0x3a8 [ 19.885389] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.896010] [] ? add_taint+0x40/0x50 [ 19.901338] [] kasan_end_report+0x50/0x50 [ 19.907099] [] kasan_report+0x167/0x360 [ 19.912687] [] ? __lock_acquire+0x2eff/0x3640 [ 19.918794] [] __asan_report_load8_noabort+0x14/0x20 [ 19.925513] [] __lock_acquire+0x2eff/0x3640 [ 19.931455] [] ? __lock_acquire+0x629/0x3640 [ 19.937480] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.944457] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.951433] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.958408] [] ? mark_held_locks+0xaf/0x100 [ 19.964343] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.970536] [] lock_acquire+0x12e/0x410 [ 19.976124] [] ? remove_wait_queue+0x14/0x40 [ 19.982146] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.988425] [] ? remove_wait_queue+0x14/0x40 [ 19.994447] [] remove_wait_queue+0x14/0x40 [ 20.000297] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.007272] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.014508] [] ? ep_free+0x1b0/0x1b0 [ 20.019832] [] ep_free+0x96/0x1b0 [ 20.024898] [] ? ep_free+0x1b0/0x1b0 [ 20.030223] [] ep_eventpoll_release+0x44/0x60 [ 20.036766] [] __fput+0x28c/0x6e0 [ 20.043837] [] ____fput+0x15/0x20 [ 20.050810] [] task_work_run+0x115/0x190 [ 20.057785] [] do_exit+0x7e7/0x2a40 [ 20.063025] [] ? selinux_file_ioctl+0x355/0x530 [ 20.069305] [] ? release_task+0x1240/0x1240 [ 20.075239] [] ? SyS_epoll_create+0x190/0x190 [ 20.081347] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.087980] [] do_group_exit+0x108/0x320 [ 20.093655] [] SyS_exit_group+0x1d/0x20 [ 20.099242] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.106237] Dumping ftrace buffer: [ 20.109747] (ftrace buffer empty) [ 20.113424] Kernel Offset: disabled [ 20.117016] Rebooting in 86400 seconds..