[....] Starting enhanced syslogd: rsyslogd[ 12.373105] audit: type=1400 audit(1517089722.150:4): avc: denied { syslog } for pid=3191 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.24' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.074148] ================================================================== [ 27.081532] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.088169] Read of size 8 at addr ffff8801c868d738 by task syzkaller675648/3348 [ 27.095668] [ 27.097267] CPU: 0 PID: 3348 Comm: syzkaller675648 Not tainted 4.9.78-g68d447c #23 [ 27.104944] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.114269] ffff8801c7aa78e0 ffffffff81d943a9 ffffea000721a300 ffff8801c868d738 [ 27.122252] 0000000000000000 ffff8801c868d738 ffff8801c868d738 ffff8801c7aa7918 [ 27.130214] ffffffff8153dc23 ffff8801c868d738 0000000000000008 0000000000000000 [ 27.138174] Call Trace: [ 27.140733] [] dump_stack+0xc1/0x128 [ 27.146068] [] print_address_description+0x73/0x280 [ 27.152704] [] kasan_report+0x275/0x360 [ 27.158299] [] ? __lock_acquire+0x2eff/0x3640 [ 27.164411] [] __asan_report_load8_noabort+0x14/0x20 [ 27.171134] [] __lock_acquire+0x2eff/0x3640 [ 27.177074] [] ? __lock_acquire+0x629/0x3640 [ 27.183100] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.190089] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.197071] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.204065] [] ? mark_held_locks+0xaf/0x100 [ 27.210004] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.216212] [] lock_acquire+0x12e/0x410 [ 27.221802] [] ? remove_wait_queue+0x14/0x40 [ 27.227825] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.234109] [] ? remove_wait_queue+0x14/0x40 [ 27.240141] [] remove_wait_queue+0x14/0x40 [ 27.246002] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.252982] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.260223] [] ? ep_free+0x1b0/0x1b0 [ 27.265552] [] ep_free+0x96/0x1b0 [ 27.270628] [] ? ep_free+0x1b0/0x1b0 [ 27.275959] [] ep_eventpoll_release+0x44/0x60 [ 27.282072] [] __fput+0x28c/0x6e0 [ 27.287139] [] ____fput+0x15/0x20 [ 27.292213] [] task_work_run+0x115/0x190 [ 27.297895] [] do_exit+0x7e7/0x2a40 [ 27.303146] [] ? selinux_file_ioctl+0x355/0x530 [ 27.309442] [] ? release_task+0x1240/0x1240 [ 27.315382] [] ? SyS_epoll_create+0x190/0x190 [ 27.321507] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 27.328142] [] do_group_exit+0x108/0x320 [ 27.333820] [] SyS_exit_group+0x1d/0x20 [ 27.339420] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.345972] [ 27.347567] Allocated by task 3348: [ 27.351164] save_stack_trace+0x16/0x20 [ 27.355108] save_stack+0x43/0xd0 [ 27.358526] kasan_kmalloc+0xad/0xe0 [ 27.362206] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.366754] binder_get_thread+0x15d/0x750 [ 27.370961] binder_poll+0x4a/0x210 [ 27.374555] SyS_epoll_ctl+0x11d7/0x2190 [ 27.378581] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.383302] [ 27.384898] Freed by task 3348: [ 27.388143] save_stack_trace+0x16/0x20 [ 27.392083] save_stack+0x43/0xd0 [ 27.395503] kasan_slab_free+0x72/0xc0 [ 27.399366] kfree+0x103/0x300 [ 27.402526] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.407335] binder_thread_release+0x27d/0x540 [ 27.411882] binder_ioctl+0x9c0/0x11b0 [ 27.415736] do_vfs_ioctl+0x1aa/0x1140 [ 27.419590] SyS_ioctl+0x8f/0xc0 [ 27.422929] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.427648] [ 27.429244] The buggy address belongs to the object at ffff8801c868d680 [ 27.429244] which belongs to the cache kmalloc-512 of size 512 [ 27.441873] The buggy address is located 184 bytes inside of [ 27.441873] 512-byte region [ffff8801c868d680, ffff8801c868d880) [ 27.453722] The buggy address belongs to the page: [ 27.458619] page:ffffea000721a300 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.468776] flags: 0x8000000000004080(slab|head) [ 27.473496] page dumped because: kasan: bad access detected [ 27.479174] [ 27.480765] Memory state around the buggy address: [ 27.485660] ffff8801c868d600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.492983] ffff8801c868d680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.500307] >ffff8801c868d700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.507628] ^ [ 27.512782] ffff8801c868d780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.520107] ffff8801c868d800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.527429] ================================================================== [ 27.534750] Disabling lock debugging due to kernel taint [ 27.540163] Kernel panic - not syncing: panic_on_warn set ... [ 27.540163] [ 27.547497] CPU: 0 PID: 3348 Comm: syzkaller675648 Tainted: G B 4.9.78-g68d447c #23 [ 27.556386] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.565719] ffff8801c7aa7838 ffffffff81d943a9 ffffffff841971bf ffff8801c7aa7910 [ 27.573674] 0000000000000000 ffff8801c868d738 ffff8801c868d738 ffff8801c7aa7900 [ 27.581630] ffffffff8142f451 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f295 [ 27.589593] Call Trace: [ 27.592152] [] dump_stack+0xc1/0x128 [ 27.597486] [] panic+0x1bc/0x3a8 [ 27.602471] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.610674] [] ? add_taint+0x40/0x50 [ 27.616009] [] kasan_end_report+0x50/0x50 [ 27.621776] [] kasan_report+0x167/0x360 [ 27.627375] [] ? __lock_acquire+0x2eff/0x3640 [ 27.633487] [] __asan_report_load8_noabort+0x14/0x20 [ 27.640210] [] __lock_acquire+0x2eff/0x3640 [ 27.646151] [] ? __lock_acquire+0x629/0x3640 [ 27.652179] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.659163] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.666154] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.673143] [] ? mark_held_locks+0xaf/0x100 [ 27.679084] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.685285] [] lock_acquire+0x12e/0x410 [ 27.690877] [] ? remove_wait_queue+0x14/0x40 [ 27.696916] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.703211] [] ? remove_wait_queue+0x14/0x40 [ 27.709247] [] remove_wait_queue+0x14/0x40 [ 27.715105] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.722087] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.729338] [] ? ep_free+0x1b0/0x1b0 [ 27.734669] [] ep_free+0x96/0x1b0 [ 27.739739] [] ? ep_free+0x1b0/0x1b0 [ 27.745071] [] ep_eventpoll_release+0x44/0x60 [ 27.751182] [] __fput+0x28c/0x6e0 [ 27.756256] [] ____fput+0x15/0x20 [ 27.761416] [] task_work_run+0x115/0x190 [ 27.767099] [] do_exit+0x7e7/0x2a40 [ 27.772344] [] ? selinux_file_ioctl+0x355/0x530 [ 27.778629] [] ? release_task+0x1240/0x1240 [ 27.784566] [] ? SyS_epoll_create+0x190/0x190 [ 27.790680] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 27.797311] [] do_group_exit+0x108/0x320 [ 27.802990] [] SyS_exit_group+0x1d/0x20 [ 27.808578] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.815483] Dumping ftrace buffer: [ 27.818989] (ftrace buffer empty) [ 27.822666] Kernel Offset: disabled [ 27.826259] Rebooting in 86400 seconds..