[....] Starting enhanced syslogd: rsyslogd[ 11.049323] audit: type=1400 audit(1514848767.112:4): avc: denied { syslog } for pid=3182 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.4' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.399395] ================================================================== [ 19.406779] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.414128] Read of size 8 at addr ffff8801c8c6b4b8 by task syzkaller652044/3330 [ 19.421628] [ 19.423232] CPU: 0 PID: 3330 Comm: syzkaller652044 Not tainted 4.9.73-gf3f3457 #11 [ 19.430902] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.440225] ffff8801c6ccf870 ffffffff81d922b9 ffffea0007231a80 ffff8801c8c6b4b8 [ 19.448173] 0000000000000000 ffff8801c8c6b4b8 ffff8801c8c6b4b8 ffff8801c6ccf8a8 [ 19.456127] ffffffff8153bab3 ffff8801c8c6b4b8 0000000000000008 0000000000000000 [ 19.464075] Call Trace: [ 19.466631] [] dump_stack+0xc1/0x128 [ 19.471982] [] print_address_description+0x73/0x280 [ 19.478619] [] kasan_report+0x275/0x360 [ 19.484224] [] ? __lock_acquire+0x2eff/0x3640 [ 19.490333] [] __asan_report_load8_noabort+0x14/0x20 [ 19.497057] [] __lock_acquire+0x2eff/0x3640 [ 19.502992] [] ? __lock_acquire+0x629/0x3640 [ 19.509018] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.515996] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.522974] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.529953] [] ? mark_held_locks+0xaf/0x100 [ 19.535896] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.542094] [] lock_acquire+0x12e/0x410 [ 19.547684] [] ? remove_wait_queue+0x14/0x40 [ 19.553716] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.559999] [] ? remove_wait_queue+0x14/0x40 [ 19.566022] [] remove_wait_queue+0x14/0x40 [ 19.571875] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.578852] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.586098] [] ? ep_free+0x1b0/0x1b0 [ 19.591426] [] ep_free+0x96/0x1b0 [ 19.596496] [] ? ep_free+0x1b0/0x1b0 [ 19.601824] [] ep_eventpoll_release+0x44/0x60 [ 19.607934] [] __fput+0x28c/0x6e0 [ 19.613008] [] ____fput+0x15/0x20 [ 19.618081] [] task_work_run+0x115/0x190 [ 19.623757] [] do_exit+0x7e7/0x2a40 [ 19.629002] [] ? __pmd_alloc+0x410/0x410 [ 19.634679] [] ? release_task+0x1240/0x1240 [ 19.640632] [] ? __do_page_fault+0x5ec/0xd40 [ 19.646673] [] ? up_read+0x1a/0x40 [ 19.651829] [] ? __do_page_fault+0x3bd/0xd40 [ 19.657857] [] do_group_exit+0x108/0x320 [ 19.663533] [] ? do_group_exit+0x320/0x320 [ 19.669381] [] SyS_exit_group+0x1d/0x20 [ 19.674969] [] do_fast_syscall_32+0x2f7/0x890 [ 19.681077] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 19.687711] [] entry_SYSENTER_compat+0x51/0x60 [ 19.693905] [ 19.695499] Allocated by task 3330: [ 19.699092] save_stack_trace+0x16/0x20 [ 19.703030] save_stack+0x43/0xd0 [ 19.706451] kasan_kmalloc+0xad/0xe0 [ 19.710127] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.714675] binder_get_thread+0x15d/0x750 [ 19.718872] binder_poll+0x4a/0x210 [ 19.722466] SyS_epoll_ctl+0x11d7/0x2190 [ 19.726490] do_fast_syscall_32+0x2f7/0x890 [ 19.730784] entry_SYSENTER_compat+0x51/0x60 [ 19.735158] [ 19.736753] Freed by task 3330: [ 19.739997] save_stack_trace+0x16/0x20 [ 19.743941] save_stack+0x43/0xd0 [ 19.747359] kasan_slab_free+0x72/0xc0 [ 19.751207] kfree+0x103/0x300 [ 19.754369] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.759180] binder_thread_release+0x27d/0x540 [ 19.763730] binder_ioctl+0x9c0/0x11b0 [ 19.767580] compat_SyS_ioctl+0x15f/0x2050 [ 19.771783] do_fast_syscall_32+0x2f7/0x890 [ 19.776068] entry_SYSENTER_compat+0x51/0x60 [ 19.780434] [ 19.782029] The buggy address belongs to the object at ffff8801c8c6b400 [ 19.782029] which belongs to the cache kmalloc-512 of size 512 [ 19.794650] The buggy address is located 184 bytes inside of [ 19.794650] 512-byte region [ffff8801c8c6b400, ffff8801c8c6b600) [ 19.806487] The buggy address belongs to the page: [ 19.811388] page:ffffea0007231a80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.821549] flags: 0x8000000000004080(slab|head) [ 19.826267] page dumped because: kasan: bad access detected [ 19.831938] [ 19.833526] Memory state around the buggy address: [ 19.838426] ffff8801c8c6b380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.845753] ffff8801c8c6b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.853076] >ffff8801c8c6b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.860404] ^ [ 19.865562] ffff8801c8c6b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.872892] ffff8801c8c6b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.880217] ================================================================== [ 19.887536] Disabling lock debugging due to kernel taint [ 19.892948] Kernel panic - not syncing: panic_on_warn set ... [ 19.892948] [ 19.900274] CPU: 0 PID: 3330 Comm: syzkaller652044 Tainted: G B 4.9.73-gf3f3457 #11 [ 19.909157] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.918479] ffff8801c6ccf7c8 ffffffff81d922b9 ffffffff841955bf ffff8801c6ccf8a0 [ 19.926432] 0000000000000000 ffff8801c8c6b4b8 ffff8801c8c6b4b8 ffff8801c6ccf890 [ 19.934373] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 19.942317] Call Trace: [ 19.945045] [] dump_stack+0xc1/0x128 [ 19.950381] [] panic+0x1bc/0x3a8 [ 19.955364] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.963557] [] ? add_taint+0x40/0x50 [ 19.968886] [] kasan_end_report+0x50/0x50 [ 19.974647] [] kasan_report+0x167/0x360 [ 19.980235] [] ? __lock_acquire+0x2eff/0x3640 [ 19.986347] [] __asan_report_load8_noabort+0x14/0x20 [ 19.993063] [] __lock_acquire+0x2eff/0x3640 [ 19.998997] [] ? __lock_acquire+0x629/0x3640 [ 20.005019] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.011996] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.019147] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.026127] [] ? mark_held_locks+0xaf/0x100 [ 20.032066] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.038263] [] lock_acquire+0x12e/0x410 [ 20.043851] [] ? remove_wait_queue+0x14/0x40 [ 20.049879] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.056161] [] ? remove_wait_queue+0x14/0x40 [ 20.062181] [] remove_wait_queue+0x14/0x40 [ 20.068030] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.075007] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.082242] [] ? ep_free+0x1b0/0x1b0 [ 20.087568] [] ep_free+0x96/0x1b0 [ 20.092637] [] ? ep_free+0x1b0/0x1b0 [ 20.097970] [] ep_eventpoll_release+0x44/0x60 [ 20.104081] [] __fput+0x28c/0x6e0 [ 20.109147] [] ____fput+0x15/0x20 [ 20.114217] [] task_work_run+0x115/0x190 [ 20.119897] [] do_exit+0x7e7/0x2a40 [ 20.125147] [] ? __pmd_alloc+0x410/0x410 [ 20.130827] [] ? release_task+0x1240/0x1240 [ 20.136772] [] ? __do_page_fault+0x5ec/0xd40 [ 20.142802] [] ? up_read+0x1a/0x40 [ 20.147956] [] ? __do_page_fault+0x3bd/0xd40 [ 20.153977] [] do_group_exit+0x108/0x320 [ 20.159654] [] ? do_group_exit+0x320/0x320 [ 20.165602] [] SyS_exit_group+0x1d/0x20 [ 20.171191] [] do_fast_syscall_32+0x2f7/0x890 [ 20.177313] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.183943] [] entry_SYSENTER_compat+0x51/0x60 [ 20.190668] Dumping ftrace buffer: [ 20.194173] (ftrace buffer empty) [ 20.197850] Kernel Offset: disabled [ 20.201449] Rebooting in 86400 seconds..