[....] Starting enhanced syslogd: rsyslogd[ 10.570209] audit: type=1400 audit(1515473421.926:4): avc: denied { syslog } for pid=3185 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.194' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 22.369708] ================================================================== [ 22.370817] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 22.371732] Read of size 8 at addr ffff8801c873efb8 by task syzkaller974895/3340 [ 22.372732] [ 22.372962] CPU: 0 PID: 3340 Comm: syzkaller974895 Not tainted 4.9.75-gb54d99a #18 [ 22.373969] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.375190] ffff8801c7567870 ffffffff81d93049 ffffea000721cf80 ffff8801c873efb8 [ 22.376320] 0000000000000000 ffff8801c873efb8 ffff8801c873efb8 ffff8801c75678a8 [ 22.377469] ffffffff8153ca53 ffff8801c873efb8 0000000000000008 0000000000000000 [ 22.378598] Call Trace: [ 22.378953] [] dump_stack+0xc1/0x128 [ 22.379681] [] print_address_description+0x73/0x280 [ 22.380555] [] kasan_report+0x275/0x360 [ 22.381333] [] ? __lock_acquire+0x2eff/0x3640 [ 22.382141] [] __asan_report_load8_noabort+0x14/0x20 [ 22.383026] [] __lock_acquire+0x2eff/0x3640 [ 22.383811] [] ? __lock_acquire+0x629/0x3640 [ 22.384607] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.385529] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.386449] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.387369] [] ? mark_held_locks+0xaf/0x100 [ 22.388159] [] ? mutex_lock_nested+0x5e3/0x870 [ 22.388978] [] lock_acquire+0x12e/0x410 [ 22.389719] [] ? remove_wait_queue+0x14/0x40 [ 22.390529] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 22.396811] [] ? remove_wait_queue+0x14/0x40 [ 22.402832] [] remove_wait_queue+0x14/0x40 [ 22.408682] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 22.415660] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 22.422897] [] ? ep_free+0x1b0/0x1b0 [ 22.428228] [] ep_free+0x96/0x1b0 [ 22.433297] [] ? ep_free+0x1b0/0x1b0 [ 22.438625] [] ep_eventpoll_release+0x44/0x60 [ 22.444740] [] __fput+0x28c/0x6e0 [ 22.449809] [] ____fput+0x15/0x20 [ 22.454879] [] task_work_run+0x115/0x190 [ 22.460566] [] do_exit+0x7e7/0x2a40 [ 22.465814] [] ? __pmd_alloc+0x410/0x410 [ 22.471491] [] ? release_task+0x1240/0x1240 [ 22.477434] [] ? __do_page_fault+0x5ec/0xd40 [ 22.483465] [] ? up_read+0x1a/0x40 [ 22.488635] [] ? __do_page_fault+0x3bd/0xd40 [ 22.494658] [] do_group_exit+0x108/0x320 [ 22.500334] [] ? do_group_exit+0x320/0x320 [ 22.506183] [] SyS_exit_group+0x1d/0x20 [ 22.511771] [] do_fast_syscall_32+0x2f7/0x890 [ 22.517880] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 22.524511] [] entry_SYSENTER_compat+0x74/0x83 [ 22.530705] [ 22.532300] Allocated by task 3340: [ 22.535895] save_stack_trace+0x16/0x20 [ 22.539835] save_stack+0x43/0xd0 [ 22.543251] kasan_kmalloc+0xad/0xe0 [ 22.546928] kmem_cache_alloc_trace+0xfb/0x2a0 [ 22.551475] binder_get_thread+0x15d/0x750 [ 22.555677] binder_poll+0x4a/0x210 [ 22.559267] SyS_epoll_ctl+0x11d7/0x2190 [ 22.563301] do_fast_syscall_32+0x2f7/0x890 [ 22.567587] entry_SYSENTER_compat+0x74/0x83 [ 22.571956] [ 22.573546] Freed by task 3340: [ 22.576790] save_stack_trace+0x16/0x20 [ 22.580728] save_stack+0x43/0xd0 [ 22.584149] kasan_slab_free+0x72/0xc0 [ 22.587999] kfree+0x103/0x300 [ 22.591168] binder_thread_dec_tmpref+0x1cc/0x240 [ 22.595973] binder_thread_release+0x27d/0x540 [ 22.600519] binder_ioctl+0x9c0/0x11b0 [ 22.604371] compat_SyS_ioctl+0x15f/0x2050 [ 22.608573] do_fast_syscall_32+0x2f7/0x890 [ 22.612860] entry_SYSENTER_compat+0x74/0x83 [ 22.617229] [ 22.618823] The buggy address belongs to the object at ffff8801c873ef00 [ 22.618823] which belongs to the cache kmalloc-512 of size 512 [ 22.631442] The buggy address is located 184 bytes inside of [ 22.631442] 512-byte region [ffff8801c873ef00, ffff8801c873f100) [ 22.643287] The buggy address belongs to the page: [ 22.648183] page:ffffea000721cf80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 22.658353] flags: 0x8000000000004080(slab|head) [ 22.663071] page dumped because: kasan: bad access detected [ 22.668749] [ 22.670340] Memory state around the buggy address: [ 22.675235] ffff8801c873ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.682560] ffff8801c873ef00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.689882] >ffff8801c873ef80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.697216] ^ [ 22.702369] ffff8801c873f000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.709700] ffff8801c873f080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.717025] ================================================================== [ 22.724346] Disabling lock debugging due to kernel taint [ 22.729758] Kernel panic - not syncing: panic_on_warn set ... [ 22.729758] [ 22.737085] CPU: 0 PID: 3340 Comm: syzkaller974895 Tainted: G B 4.9.75-gb54d99a #18 [ 22.745970] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.755291] ffff8801c75677c8 ffffffff81d93049 ffffffff84195be7 ffff8801c75678a0 [ 22.763241] 0000000000000000 ffff8801c873efb8 ffff8801c873efb8 ffff8801c7567890 [ 22.771198] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 22.779144] Call Trace: [ 22.781700] [] dump_stack+0xc1/0x128 [ 22.787029] [] panic+0x1bc/0x3a8 [ 22.792012] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 22.800213] [] ? add_taint+0x40/0x50 [ 22.805551] [] kasan_end_report+0x50/0x50 [ 22.811314] [] kasan_report+0x167/0x360 [ 22.816903] [] ? __lock_acquire+0x2eff/0x3640 [ 22.823013] [] __asan_report_load8_noabort+0x14/0x20 [ 22.829730] [] __lock_acquire+0x2eff/0x3640 [ 22.835678] [] ? __lock_acquire+0x629/0x3640 [ 22.841703] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.848690] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.855670] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.862646] [] ? mark_held_locks+0xaf/0x100 [ 22.868589] [] ? mutex_lock_nested+0x5e3/0x870 [ 22.874790] [] lock_acquire+0x12e/0x410 [ 22.880379] [] ? remove_wait_queue+0x14/0x40 [ 22.886401] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 22.892684] [] ? remove_wait_queue+0x14/0x40 [ 22.898708] [] remove_wait_queue+0x14/0x40 [ 22.904560] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 22.911547] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 22.918783] [] ? ep_free+0x1b0/0x1b0 [ 22.924109] [] ep_free+0x96/0x1b0 [ 22.929175] [] ? ep_free+0x1b0/0x1b0 [ 22.934503] [] ep_eventpoll_release+0x44/0x60 [ 22.940611] [] __fput+0x28c/0x6e0 [ 22.945678] [] ____fput+0x15/0x20 [ 22.950761] [] task_work_run+0x115/0x190 [ 22.956438] [] do_exit+0x7e7/0x2a40 [ 22.961682] [] ? __pmd_alloc+0x410/0x410 [ 22.967364] [] ? release_task+0x1240/0x1240 [ 22.973302] [] ? __do_page_fault+0x5ec/0xd40 [ 22.979331] [] ? up_read+0x1a/0x40 [ 22.984492] [] ? __do_page_fault+0x3bd/0xd40 [ 22.990516] [] do_group_exit+0x108/0x320 [ 22.996194] [] ? do_group_exit+0x320/0x320 [ 23.002044] [] SyS_exit_group+0x1d/0x20 [ 23.007646] [] do_fast_syscall_32+0x2f7/0x890 [ 23.013754] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 23.020392] [] entry_SYSENTER_compat+0x74/0x83 [ 23.026627] Dumping ftrace buffer: [ 23.030134] (ftrace buffer empty) [ 23.033819] Kernel Offset: disabled [ 23.037411] Rebooting in 86400 seconds..