[....] Starting enhanced syslogd: rsyslogd[ 10.697312] audit: type=1400 audit(1516194791.880:4): avc: denied { syslog } for pid=3171 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.199' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 43.616487] ================================================================== [ 43.617588] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 43.618485] Read of size 8 at addr ffff8801c9ba2ab8 by task syzkaller342119/3343 [ 43.619473] [ 43.619705] CPU: 0 PID: 3343 Comm: syzkaller342119 Not tainted 4.9.77-g033d019 #24 [ 43.620824] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.622074] ffff8801c9217870 ffffffff81d941c9 ffffea000726e880 ffff8801c9ba2ab8 [ 43.623222] 0000000000000000 ffff8801c9ba2ab8 ffff8801c9ba2ab8 ffff8801c92178a8 [ 43.624408] ffffffff8153db93 ffff8801c9ba2ab8 0000000000000008 0000000000000000 [ 43.625566] Call Trace: [ 43.625926] [] dump_stack+0xc1/0x128 [ 43.626641] [] print_address_description+0x73/0x280 [ 43.627530] [] kasan_report+0x275/0x360 [ 43.628274] [] ? __lock_acquire+0x2eff/0x3640 [ 43.629095] [] __asan_report_load8_noabort+0x14/0x20 [ 43.629984] [] __lock_acquire+0x2eff/0x3640 [ 43.630775] [] ? __lock_acquire+0x629/0x3640 [ 43.631579] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 43.632505] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 43.633465] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 43.634408] [] ? mark_held_locks+0xaf/0x100 [ 43.635198] [] ? mutex_lock_nested+0x5e3/0x870 [ 43.636033] [] lock_acquire+0x12e/0x410 [ 43.636779] [] ? remove_wait_queue+0x14/0x40 [ 43.642807] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 43.649094] [] ? remove_wait_queue+0x14/0x40 [ 43.655120] [] remove_wait_queue+0x14/0x40 [ 43.660979] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 43.667963] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 43.675207] [] ? ep_free+0x1b0/0x1b0 [ 43.680537] [] ep_free+0x96/0x1b0 [ 43.685606] [] ? ep_free+0x1b0/0x1b0 [ 43.690939] [] ep_eventpoll_release+0x44/0x60 [ 43.697053] [] __fput+0x28c/0x6e0 [ 43.702121] [] ____fput+0x15/0x20 [ 43.707190] [] task_work_run+0x115/0x190 [ 43.712868] [] do_exit+0x7e7/0x2a40 [ 43.718110] [] ? __pmd_alloc+0x410/0x410 [ 43.723796] [] ? release_task+0x1240/0x1240 [ 43.729737] [] ? __do_page_fault+0x5ec/0xd40 [ 43.735766] [] ? up_read+0x1a/0x40 [ 43.740921] [] ? __do_page_fault+0x3bd/0xd40 [ 43.746957] [] do_group_exit+0x108/0x320 [ 43.752643] [] ? do_group_exit+0x320/0x320 [ 43.758496] [] SyS_exit_group+0x1d/0x20 [ 43.764086] [] do_fast_syscall_32+0x2f7/0x890 [ 43.770200] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 43.776836] [] entry_SYSENTER_compat+0x74/0x83 [ 43.783032] [ 43.784626] Allocated by task 3343: [ 43.788220] save_stack_trace+0x16/0x20 [ 43.792159] save_stack+0x43/0xd0 [ 43.795579] kasan_kmalloc+0xad/0xe0 [ 43.799269] kmem_cache_alloc_trace+0xfb/0x2a0 [ 43.803819] binder_get_thread+0x15d/0x750 [ 43.808020] binder_poll+0x4a/0x210 [ 43.811617] SyS_epoll_ctl+0x11d7/0x2190 [ 43.815652] do_fast_syscall_32+0x2f7/0x890 [ 43.819943] entry_SYSENTER_compat+0x74/0x83 [ 43.824320] [ 43.825914] Freed by task 3343: [ 43.829161] save_stack_trace+0x16/0x20 [ 43.833106] save_stack+0x43/0xd0 [ 43.836528] kasan_slab_free+0x72/0xc0 [ 43.840385] kfree+0x103/0x300 [ 43.843556] binder_thread_dec_tmpref+0x1cc/0x240 [ 43.848369] binder_thread_release+0x27d/0x540 [ 43.852916] binder_ioctl+0x9c0/0x11b0 [ 43.856773] compat_SyS_ioctl+0x15f/0x2050 [ 43.860977] do_fast_syscall_32+0x2f7/0x890 [ 43.865270] entry_SYSENTER_compat+0x74/0x83 [ 43.869642] [ 43.871244] The buggy address belongs to the object at ffff8801c9ba2a00 [ 43.871244] which belongs to the cache kmalloc-512 of size 512 [ 43.883867] The buggy address is located 184 bytes inside of [ 43.883867] 512-byte region [ffff8801c9ba2a00, ffff8801c9ba2c00) [ 43.895707] The buggy address belongs to the page: [ 43.900612] page:ffffea000726e880 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 43.910780] flags: 0x8000000000004080(slab|head) [ 43.915501] page dumped because: kasan: bad access detected [ 43.921177] [ 43.922783] Memory state around the buggy address: [ 43.927679] ffff8801c9ba2980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 43.935007] ffff8801c9ba2a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.942336] >ffff8801c9ba2a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.949661] ^ [ 43.954827] ffff8801c9ba2b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.962155] ffff8801c9ba2b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.969479] ================================================================== [ 43.976806] Disabling lock debugging due to kernel taint [ 43.982223] Kernel panic - not syncing: panic_on_warn set ... [ 43.982223] [ 43.989568] CPU: 0 PID: 3343 Comm: syzkaller342119 Tainted: G B 4.9.77-g033d019 #24 [ 43.998563] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.007907] ffff8801c92177c8 ffffffff81d941c9 ffffffff841970ff ffff8801c92178a0 [ 44.015886] 0000000000000000 ffff8801c9ba2ab8 ffff8801c9ba2ab8 ffff8801c9217890 [ 44.023870] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 44.031840] Call Trace: [ 44.034399] [] dump_stack+0xc1/0x128 [ 44.039734] [] panic+0x1bc/0x3a8 [ 44.044722] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 44.052923] [] ? add_taint+0x40/0x50 [ 44.058257] [] kasan_end_report+0x50/0x50 [ 44.064027] [] kasan_report+0x167/0x360 [ 44.069625] [] ? __lock_acquire+0x2eff/0x3640 [ 44.075749] [] __asan_report_load8_noabort+0x14/0x20 [ 44.082472] [] __lock_acquire+0x2eff/0x3640 [ 44.088415] [] ? __lock_acquire+0x629/0x3640 [ 44.094445] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 44.101431] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 44.108426] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 44.115420] [] ? mark_held_locks+0xaf/0x100 [ 44.121362] [] ? mutex_lock_nested+0x5e3/0x870 [ 44.127564] [] lock_acquire+0x12e/0x410 [ 44.133159] [] ? remove_wait_queue+0x14/0x40 [ 44.139188] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 44.145486] [] ? remove_wait_queue+0x14/0x40 [ 44.151513] [] remove_wait_queue+0x14/0x40 [ 44.157372] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 44.164356] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 44.171599] [] ? ep_free+0x1b0/0x1b0 [ 44.176934] [] ep_free+0x96/0x1b0 [ 44.182006] [] ? ep_free+0x1b0/0x1b0 [ 44.187338] [] ep_eventpoll_release+0x44/0x60 [ 44.193460] [] __fput+0x28c/0x6e0 [ 44.198532] [] ____fput+0x15/0x20 [ 44.203602] [] task_work_run+0x115/0x190 [ 44.209295] [] do_exit+0x7e7/0x2a40 [ 44.214543] [] ? __pmd_alloc+0x410/0x410 [ 44.220233] [] ? release_task+0x1240/0x1240 [ 44.226175] [] ? __do_page_fault+0x5ec/0xd40 [ 44.232207] [] ? up_read+0x1a/0x40 [ 44.237369] [] ? __do_page_fault+0x3bd/0xd40 [ 44.243397] [] do_group_exit+0x108/0x320 [ 44.249076] [] ? do_group_exit+0x320/0x320 [ 44.254935] [] SyS_exit_group+0x1d/0x20 [ 44.260548] [] do_fast_syscall_32+0x2f7/0x890 [ 44.266681] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 44.273321] [] entry_SYSENTER_compat+0x74/0x83 [ 44.279983] Dumping ftrace buffer: [ 44.283493] (ftrace buffer empty) [ 44.287176] Kernel Offset: disabled [ 44.290771] Rebooting in 86400 seconds..