[....] Starting enhanced syslogd: rsyslogd[ 10.538484] audit: type=1400 audit(1515819167.275:4): avc: denied { syslog } for pid=3179 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.15.235' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.373736] ================================================================== [ 26.374914] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.375809] Read of size 8 at addr ffff8801c8f0e838 by task syzkaller304206/3336 [ 26.376815] [ 26.377046] CPU: 0 PID: 3336 Comm: syzkaller304206 Not tainted 4.9.76-g8e170a5 #21 [ 26.378075] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.379700] ffff8801ca557870 ffffffff81d93149 ffffea000723c380 ffff8801c8f0e838 [ 26.381256] 0000000000000000 ffff8801c8f0e838 ffff8801c8f0e838 ffff8801ca5578a8 [ 26.382835] ffffffff8153cb43 ffff8801c8f0e838 0000000000000008 0000000000000000 [ 26.383964] Call Trace: [ 26.384332] [] dump_stack+0xc1/0x128 [ 26.385068] [] print_address_description+0x73/0x280 [ 26.386011] [] kasan_report+0x275/0x360 [ 26.386768] [] ? __lock_acquire+0x2eff/0x3640 [ 26.387611] [] __asan_report_load8_noabort+0x14/0x20 [ 26.388509] [] __lock_acquire+0x2eff/0x3640 [ 26.389294] [] ? __lock_acquire+0x629/0x3640 [ 26.390114] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.391056] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.391978] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.392947] [] ? mark_held_locks+0xaf/0x100 [ 26.393787] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.394605] [] lock_acquire+0x12e/0x410 [ 26.400194] [] ? remove_wait_queue+0x14/0x40 [ 26.406223] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.412596] [] ? remove_wait_queue+0x14/0x40 [ 26.418628] [] remove_wait_queue+0x14/0x40 [ 26.424482] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.431458] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.438695] [] ? ep_free+0x1b0/0x1b0 [ 26.444028] [] ep_free+0x96/0x1b0 [ 26.449107] [] ? ep_free+0x1b0/0x1b0 [ 26.454435] [] ep_eventpoll_release+0x44/0x60 [ 26.460547] [] __fput+0x28c/0x6e0 [ 26.465614] [] ____fput+0x15/0x20 [ 26.470682] [] task_work_run+0x115/0x190 [ 26.476355] [] do_exit+0x7e7/0x2a40 [ 26.481598] [] ? __pmd_alloc+0x410/0x410 [ 26.487271] [] ? release_task+0x1240/0x1240 [ 26.494858] [] ? __do_page_fault+0x5ec/0xd40 [ 26.500882] [] ? up_read+0x1a/0x40 [ 26.506041] [] ? __do_page_fault+0x3bd/0xd40 [ 26.512753] [] do_group_exit+0x108/0x320 [ 26.518778] [] ? do_group_exit+0x320/0x320 [ 26.524634] [] SyS_exit_group+0x1d/0x20 [ 26.531091] [] do_fast_syscall_32+0x2f7/0x890 [ 26.537204] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.543835] [] entry_SYSENTER_compat+0x74/0x83 [ 26.550027] [ 26.552317] Allocated by task 3336: [ 26.555909] save_stack_trace+0x16/0x20 [ 26.559846] save_stack+0x43/0xd0 [ 26.563262] kasan_kmalloc+0xad/0xe0 [ 26.566938] kmem_cache_alloc_trace+0xfb/0x2a0 [ 26.571484] binder_get_thread+0x15d/0x750 [ 26.575776] binder_poll+0x4a/0x210 [ 26.579365] SyS_epoll_ctl+0x11d7/0x2190 [ 26.583391] do_fast_syscall_32+0x2f7/0x890 [ 26.587676] entry_SYSENTER_compat+0x74/0x83 [ 26.592045] [ 26.593635] Freed by task 3336: [ 26.596877] save_stack_trace+0x16/0x20 [ 26.600815] save_stack+0x43/0xd0 [ 26.604232] kasan_slab_free+0x72/0xc0 [ 26.608257] kfree+0x103/0x300 [ 26.612757] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.618170] binder_thread_release+0x27d/0x540 [ 26.622714] binder_ioctl+0x9c0/0x11b0 [ 26.626585] compat_SyS_ioctl+0x15f/0x2050 [ 26.630781] do_fast_syscall_32+0x2f7/0x890 [ 26.635076] entry_SYSENTER_compat+0x74/0x83 [ 26.639444] [ 26.641036] The buggy address belongs to the object at ffff8801c8f0e780 [ 26.641036] which belongs to the cache kmalloc-512 of size 512 [ 26.653653] The buggy address is located 184 bytes inside of [ 26.653653] 512-byte region [ffff8801c8f0e780, ffff8801c8f0e980) [ 26.665497] The buggy address belongs to the page: [ 26.670392] page:ffffea000723c380 count:1 mapcount:0 mapping: (null) index:0xffff8801c8f0f180 compound_mapcount: 0 [ 26.683154] flags: 0x8000000000004080(slab|head) [ 26.689171] page dumped because: kasan: bad access detected [ 26.694844] [ 26.696433] Memory state around the buggy address: [ 26.701324] ffff8801c8f0e700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.708647] ffff8801c8f0e780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.715969] >ffff8801c8f0e800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.723292] ^ [ 26.728449] ffff8801c8f0e880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.735772] ffff8801c8f0e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.743095] ================================================================== [ 26.750422] Disabling lock debugging due to kernel taint [ 26.755835] Kernel panic - not syncing: panic_on_warn set ... [ 26.755835] [ 26.763516] CPU: 0 PID: 3336 Comm: syzkaller304206 Tainted: G B 4.9.76-g8e170a5 #21 [ 26.772403] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.781725] ffff8801ca5577c8 ffffffff81d93149 ffffffff84195c17 ffff8801ca5578a0 [ 26.789672] 0000000000000000 ffff8801c8f0e838 ffff8801c8f0e838 ffff8801ca557890 [ 26.797979] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 26.807228] Call Trace: [ 26.809789] [] dump_stack+0xc1/0x128 [ 26.815115] [] panic+0x1bc/0x3a8 [ 26.820102] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.828294] [] ? add_taint+0x40/0x50 [ 26.834232] [] kasan_end_report+0x50/0x50 [ 26.841034] [] kasan_report+0x167/0x360 [ 26.847489] [] ? __lock_acquire+0x2eff/0x3640 [ 26.855246] [] __asan_report_load8_noabort+0x14/0x20 [ 26.861961] [] __lock_acquire+0x2eff/0x3640 [ 26.867895] [] ? __lock_acquire+0x629/0x3640 [ 26.873923] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.880901] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.887887] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.894869] [] ? mark_held_locks+0xaf/0x100 [ 26.900806] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.906999] [] lock_acquire+0x12e/0x410 [ 26.912586] [] ? remove_wait_queue+0x14/0x40 [ 26.918785] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.925071] [] ? remove_wait_queue+0x14/0x40 [ 26.931095] [] remove_wait_queue+0x14/0x40 [ 26.936943] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.943922] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.951158] [] ? ep_free+0x1b0/0x1b0 [ 26.956484] [] ep_free+0x96/0x1b0 [ 26.962868] [] ? ep_free+0x1b0/0x1b0 [ 26.968195] [] ep_eventpoll_release+0x44/0x60 [ 26.974305] [] __fput+0x28c/0x6e0 [ 26.979374] [] ____fput+0x15/0x20 [ 26.984441] [] task_work_run+0x115/0x190 [ 26.990116] [] do_exit+0x7e7/0x2a40 [ 26.996404] [] ? __pmd_alloc+0x410/0x410 [ 27.002078] [] ? release_task+0x1240/0x1240 [ 27.008275] [] ? __do_page_fault+0x5ec/0xd40 [ 27.014301] [] ? up_read+0x1a/0x40 [ 27.019458] [] ? __do_page_fault+0x3bd/0xd40 [ 27.025483] [] do_group_exit+0x108/0x320 [ 27.031159] [] ? do_group_exit+0x320/0x320 [ 27.037008] [] SyS_exit_group+0x1d/0x20 [ 27.042600] [] do_fast_syscall_32+0x2f7/0x890 [ 27.048716] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.055348] [] entry_SYSENTER_compat+0x74/0x83 [ 27.062247] Dumping ftrace buffer: [ 27.066712] (ftrace buffer empty) [ 27.070400] Kernel Offset: disabled [ 27.073994] Rebooting in 86400 seconds..