[....] Starting enhanced syslogd: rsyslogd[ 13.286811] audit: type=1400 audit(1516309225.189:4): avc: denied { syslog } for pid=3174 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.15.230' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.575851] ================================================================== [ 27.583273] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.589908] Read of size 8 at addr ffff8801cc880338 by task syzkaller831843/3331 [ 27.597407] [ 27.599009] CPU: 0 PID: 3331 Comm: syzkaller831843 Not tainted 4.9.77-g8788313 #25 [ 27.607573] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.616916] ffff8801c9617870 ffffffff81d941c9 ffffea0007322000 ffff8801cc880338 [ 27.624923] 0000000000000000 ffff8801cc880338 ffff8801cc880338 ffff8801c96178a8 [ 27.632899] ffffffff8153db93 ffff8801cc880338 0000000000000008 0000000000000000 [ 27.641835] Call Trace: [ 27.644399] [] dump_stack+0xc1/0x128 [ 27.649735] [] print_address_description+0x73/0x280 [ 27.656371] [] kasan_report+0x275/0x360 [ 27.662664] [] ? __lock_acquire+0x2eff/0x3640 [ 27.669741] [] __asan_report_load8_noabort+0x14/0x20 [ 27.676472] [] __lock_acquire+0x2eff/0x3640 [ 27.682432] [] ? __lock_acquire+0x629/0x3640 [ 27.688472] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.695629] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.702885] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.709872] [] ? mark_held_locks+0xaf/0x100 [ 27.715818] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.722025] [] lock_acquire+0x12e/0x410 [ 27.727619] [] ? remove_wait_queue+0x14/0x40 [ 27.733647] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.739935] [] ? remove_wait_queue+0x14/0x40 [ 27.747049] [] remove_wait_queue+0x14/0x40 [ 27.752917] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.759937] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.767185] [] ? ep_free+0x1b0/0x1b0 [ 27.772518] [] ep_free+0x96/0x1b0 [ 27.777591] [] ? ep_free+0x1b0/0x1b0 [ 27.782924] [] ep_eventpoll_release+0x44/0x60 [ 27.789041] [] __fput+0x28c/0x6e0 [ 27.794202] [] ____fput+0x15/0x20 [ 27.799275] [] task_work_run+0x115/0x190 [ 27.804959] [] do_exit+0x7e7/0x2a40 [ 27.810218] [] ? __pmd_alloc+0x410/0x410 [ 27.815899] [] ? release_task+0x1240/0x1240 [ 27.821853] [] ? __do_page_fault+0x5ec/0xd40 [ 27.827884] [] ? up_read+0x1a/0x40 [ 27.833042] [] ? __do_page_fault+0x3bd/0xd40 [ 27.839068] [] do_group_exit+0x108/0x320 [ 27.844749] [] ? do_group_exit+0x320/0x320 [ 27.850602] [] SyS_exit_group+0x1d/0x20 [ 27.856196] [] do_fast_syscall_32+0x2f7/0x890 [ 27.862744] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.870075] [] entry_SYSENTER_compat+0x74/0x83 [ 27.876274] [ 27.877886] Allocated by task 3331: [ 27.881498] save_stack_trace+0x16/0x20 [ 27.885446] save_stack+0x43/0xd0 [ 27.888868] kasan_kmalloc+0xad/0xe0 [ 27.892552] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.897107] binder_get_thread+0x15d/0x750 [ 27.901311] binder_poll+0x4a/0x210 [ 27.904912] SyS_epoll_ctl+0x11d7/0x2190 [ 27.908943] do_fast_syscall_32+0x2f7/0x890 [ 27.913233] entry_SYSENTER_compat+0x74/0x83 [ 27.917610] [ 27.919206] Freed by task 3331: [ 27.922454] save_stack_trace+0x16/0x20 [ 27.926401] save_stack+0x43/0xd0 [ 27.929823] kasan_slab_free+0x72/0xc0 [ 27.933677] kfree+0x103/0x300 [ 27.936838] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.941646] binder_thread_release+0x27d/0x540 [ 27.946206] binder_ioctl+0x9c0/0x11b0 [ 27.950066] compat_SyS_ioctl+0x15f/0x2050 [ 27.955241] do_fast_syscall_32+0x2f7/0x890 [ 27.959529] entry_SYSENTER_compat+0x74/0x83 [ 27.963905] [ 27.965507] The buggy address belongs to the object at ffff8801cc880280 [ 27.965507] which belongs to the cache kmalloc-512 of size 512 [ 27.978143] The buggy address is located 184 bytes inside of [ 27.978143] 512-byte region [ffff8801cc880280, ffff8801cc880480) [ 27.989991] The buggy address belongs to the page: [ 27.994894] page:ffffea0007322000 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.005102] flags: 0x8000000000004080(slab|head) [ 28.009827] page dumped because: kasan: bad access detected [ 28.015505] [ 28.017100] Memory state around the buggy address: [ 28.021999] ffff8801cc880200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.029331] ffff8801cc880280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.036667] >ffff8801cc880300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.044003] ^ [ 28.049163] ffff8801cc880380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.056491] ffff8801cc880400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.065660] ================================================================== [ 28.072987] Disabling lock debugging due to kernel taint [ 28.078418] Kernel panic - not syncing: panic_on_warn set ... [ 28.078418] [ 28.085752] CPU: 0 PID: 3331 Comm: syzkaller831843 Tainted: G B 4.9.77-g8788313 #25 [ 28.094642] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.103987] ffff8801c96177c8 ffffffff81d941c9 ffffffff841970ff ffff8801c96178a0 [ 28.113008] 0000000000000000 ffff8801cc880338 ffff8801cc880338 ffff8801c9617890 [ 28.120985] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 28.129746] Call Trace: [ 28.133278] [] dump_stack+0xc1/0x128 [ 28.138619] [] panic+0x1bc/0x3a8 [ 28.143606] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 28.151805] [] ? add_taint+0x40/0x50 [ 28.157138] [] kasan_end_report+0x50/0x50 [ 28.162904] [] kasan_report+0x167/0x360 [ 28.168499] [] ? __lock_acquire+0x2eff/0x3640 [ 28.174613] [] __asan_report_load8_noabort+0x14/0x20 [ 28.181335] [] __lock_acquire+0x2eff/0x3640 [ 28.187274] [] ? __lock_acquire+0x629/0x3640 [ 28.193303] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.200288] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.207271] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.214266] [] ? mark_held_locks+0xaf/0x100 [ 28.220208] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.226425] [] lock_acquire+0x12e/0x410 [ 28.232461] [] ? remove_wait_queue+0x14/0x40 [ 28.238498] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.244806] [] ? remove_wait_queue+0x14/0x40 [ 28.250855] [] remove_wait_queue+0x14/0x40 [ 28.256734] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.263722] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.272508] [] ? ep_free+0x1b0/0x1b0 [ 28.277933] [] ep_free+0x96/0x1b0 [ 28.283006] [] ? ep_free+0x1b0/0x1b0 [ 28.288340] [] ep_eventpoll_release+0x44/0x60 [ 28.294469] [] __fput+0x28c/0x6e0 [ 28.299554] [] ____fput+0x15/0x20 [ 28.304629] [] task_work_run+0x115/0x190 [ 28.310310] [] do_exit+0x7e7/0x2a40 [ 28.315557] [] ? __pmd_alloc+0x410/0x410 [ 28.321250] [] ? release_task+0x1240/0x1240 [ 28.327194] [] ? __do_page_fault+0x5ec/0xd40 [ 28.333222] [] ? up_read+0x1a/0x40 [ 28.338382] [] ? __do_page_fault+0x3bd/0xd40 [ 28.344411] [] do_group_exit+0x108/0x320 [ 28.350100] [] ? do_group_exit+0x320/0x320 [ 28.355965] [] SyS_exit_group+0x1d/0x20 [ 28.361578] [] do_fast_syscall_32+0x2f7/0x890 [ 28.367691] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.374330] [] entry_SYSENTER_compat+0x74/0x83 [ 28.381295] Dumping ftrace buffer: [ 28.385241] (ftrace buffer empty) [ 28.388921] Kernel Offset: disabled [ 28.392517] Rebooting in 86400 seconds..