[....] Starting enhanced syslogd: rsyslogd[ 13.151212] audit: type=1400 audit(1517028565.218:4): avc: denied { syslog } for pid=3170 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.61' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.728992] ================================================================== [ 20.736442] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.743076] Read of size 8 at addr ffff8801cd7a0fb8 by task syzkaller229858/3319 [ 20.750574] [ 20.752172] CPU: 0 PID: 3319 Comm: syzkaller229858 Not tainted 4.9.78-g68d447c #32 [ 20.759846] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.769182] ffff8801c938f870 ffffffff81d943a9 ffffea000735e800 ffff8801cd7a0fb8 [ 20.777151] 0000000000000000 ffff8801cd7a0fb8 ffff8801cd7a0fb8 ffff8801c938f8a8 [ 20.785120] ffffffff8153dc23 ffff8801cd7a0fb8 0000000000000008 0000000000000000 [ 20.793080] Call Trace: [ 20.795638] [] dump_stack+0xc1/0x128 [ 20.800976] [] print_address_description+0x73/0x280 [ 20.807612] [] kasan_report+0x275/0x360 [ 20.813205] [] ? __lock_acquire+0x2eff/0x3640 [ 20.819341] [] __asan_report_load8_noabort+0x14/0x20 [ 20.826064] [] __lock_acquire+0x2eff/0x3640 [ 20.832004] [] ? __lock_acquire+0x629/0x3640 [ 20.838029] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.845011] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.851999] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.858987] [] ? mark_held_locks+0xaf/0x100 [ 20.864935] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.871140] [] lock_acquire+0x12e/0x410 [ 20.876732] [] ? remove_wait_queue+0x14/0x40 [ 20.882759] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.889046] [] ? remove_wait_queue+0x14/0x40 [ 20.895071] [] remove_wait_queue+0x14/0x40 [ 20.900924] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.907911] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.915153] [] ? ep_free+0x1b0/0x1b0 [ 20.920484] [] ep_free+0x96/0x1b0 [ 20.925557] [] ? ep_free+0x1b0/0x1b0 [ 20.930887] [] ep_eventpoll_release+0x44/0x60 [ 20.937002] [] __fput+0x28c/0x6e0 [ 20.942071] [] ____fput+0x15/0x20 [ 20.947141] [] task_work_run+0x115/0x190 [ 20.952821] [] do_exit+0x7e7/0x2a40 [ 20.958072] [] ? __pmd_alloc+0x410/0x410 [ 20.963750] [] ? release_task+0x1240/0x1240 [ 20.969691] [] ? __do_page_fault+0x5ec/0xd40 [ 20.975716] [] ? up_read+0x1a/0x40 [ 20.980875] [] ? __do_page_fault+0x3bd/0xd40 [ 20.986900] [] do_group_exit+0x108/0x320 [ 20.992587] [] ? do_group_exit+0x320/0x320 [ 20.998444] [] SyS_exit_group+0x1d/0x20 [ 21.004038] [] do_fast_syscall_32+0x2f7/0x890 [ 21.010151] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 21.016787] [] entry_SYSENTER_compat+0x74/0x83 [ 21.022982] [ 21.024584] Allocated by task 3319: [ 21.028186] save_stack_trace+0x16/0x20 [ 21.032126] save_stack+0x43/0xd0 [ 21.035546] kasan_kmalloc+0xad/0xe0 [ 21.039229] kmem_cache_alloc_trace+0xfb/0x2a0 [ 21.043781] binder_get_thread+0x15d/0x750 [ 21.047981] binder_poll+0x4a/0x210 [ 21.051576] SyS_epoll_ctl+0x11d7/0x2190 [ 21.055605] do_fast_syscall_32+0x2f7/0x890 [ 21.059896] entry_SYSENTER_compat+0x74/0x83 [ 21.064277] [ 21.065870] Freed by task 3319: [ 21.069117] save_stack_trace+0x16/0x20 [ 21.073060] save_stack+0x43/0xd0 [ 21.076480] kasan_slab_free+0x72/0xc0 [ 21.080335] kfree+0x103/0x300 [ 21.083498] binder_thread_dec_tmpref+0x1cc/0x240 [ 21.088306] binder_thread_release+0x27d/0x540 [ 21.092856] binder_ioctl+0x9c0/0x11b0 [ 21.096712] compat_SyS_ioctl+0x15f/0x2050 [ 21.100919] do_fast_syscall_32+0x2f7/0x890 [ 21.105213] entry_SYSENTER_compat+0x74/0x83 [ 21.109595] [ 21.111195] The buggy address belongs to the object at ffff8801cd7a0f00 [ 21.111195] which belongs to the cache kmalloc-512 of size 512 [ 21.123819] The buggy address is located 184 bytes inside of [ 21.123819] 512-byte region [ffff8801cd7a0f00, ffff8801cd7a1100) [ 21.135664] The buggy address belongs to the page: [ 21.140568] page:ffffea000735e800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 21.150729] flags: 0x8000000000004080(slab|head) [ 21.155457] page dumped because: kasan: bad access detected [ 21.161139] [ 21.162739] Memory state around the buggy address: [ 21.167642] ffff8801cd7a0e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.174969] ffff8801cd7a0f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.182295] >ffff8801cd7a0f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.189621] ^ [ 21.194787] ffff8801cd7a1000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.202113] ffff8801cd7a1080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.209438] ================================================================== [ 21.216764] Disabling lock debugging due to kernel taint [ 21.222181] Kernel panic - not syncing: panic_on_warn set ... [ 21.222181] [ 21.229516] CPU: 0 PID: 3319 Comm: syzkaller229858 Tainted: G B 4.9.78-g68d447c #32 [ 21.238405] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.247738] ffff8801c938f7c8 ffffffff81d943a9 ffffffff841971bf ffff8801c938f8a0 [ 21.255708] 0000000000000000 ffff8801cd7a0fb8 ffff8801cd7a0fb8 ffff8801c938f890 [ 21.263671] ffffffff8142f451 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f295 [ 21.271643] Call Trace: [ 21.274203] [] dump_stack+0xc1/0x128 [ 21.279539] [] panic+0x1bc/0x3a8 [ 21.284530] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 21.292730] [] ? add_taint+0x40/0x50 [ 21.298074] [] kasan_end_report+0x50/0x50 [ 21.303843] [] kasan_report+0x167/0x360 [ 21.309966] [] ? __lock_acquire+0x2eff/0x3640 [ 21.316085] [] __asan_report_load8_noabort+0x14/0x20 [ 21.322809] [] __lock_acquire+0x2eff/0x3640 [ 21.328748] [] ? __lock_acquire+0x629/0x3640 [ 21.334776] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.341761] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.348748] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.355732] [] ? mark_held_locks+0xaf/0x100 [ 21.361675] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.367882] [] lock_acquire+0x12e/0x410 [ 21.373476] [] ? remove_wait_queue+0x14/0x40 [ 21.379511] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.385797] [] ? remove_wait_queue+0x14/0x40 [ 21.391828] [] remove_wait_queue+0x14/0x40 [ 21.397689] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.404670] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.411916] [] ? ep_free+0x1b0/0x1b0 [ 21.417247] [] ep_free+0x96/0x1b0 [ 21.422333] [] ? ep_free+0x1b0/0x1b0 [ 21.427666] [] ep_eventpoll_release+0x44/0x60 [ 21.433782] [] __fput+0x28c/0x6e0 [ 21.438856] [] ____fput+0x15/0x20 [ 21.443928] [] task_work_run+0x115/0x190 [ 21.449608] [] do_exit+0x7e7/0x2a40 [ 21.454852] [] ? __pmd_alloc+0x410/0x410 [ 21.460538] [] ? release_task+0x1240/0x1240 [ 21.466478] [] ? __do_page_fault+0x5ec/0xd40 [ 21.472506] [] ? up_read+0x1a/0x40 [ 21.477664] [] ? __do_page_fault+0x3bd/0xd40 [ 21.483688] [] do_group_exit+0x108/0x320 [ 21.489367] [] ? do_group_exit+0x320/0x320 [ 21.495228] [] SyS_exit_group+0x1d/0x20 [ 21.500820] [] do_fast_syscall_32+0x2f7/0x890 [ 21.506930] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 21.513563] [] entry_SYSENTER_compat+0x74/0x83 [ 21.520177] Dumping ftrace buffer: [ 21.523690] (ftrace buffer empty) [ 21.527378] Kernel Offset: disabled [ 21.530976] Rebooting in 86400 seconds..