[....] Starting enhanced syslogd: rsyslogd[ 13.412618] audit: type=1400 audit(1516119132.518:4): avc: denied { syslog } for pid=3186 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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.41' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.971867] ================================================================== [ 26.979246] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.985878] Read of size 8 at addr ffff8801cd641238 by task syzkaller258132/3342 [ 26.993375] [ 26.994974] CPU: 0 PID: 3342 Comm: syzkaller258132 Not tainted 4.9.76-g8dec074 #23 [ 27.002648] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.011973] ffff8801cd817870 ffffffff81d93169 ffffea0007359000 ffff8801cd641238 [ 27.019935] 0000000000000000 ffff8801cd641238 ffff8801cd641238 ffff8801cd8178a8 [ 27.027895] ffffffff8153cb43 ffff8801cd641238 0000000000000008 0000000000000000 [ 27.035867] Call Trace: [ 27.038424] [] dump_stack+0xc1/0x128 [ 27.043757] [] print_address_description+0x73/0x280 [ 27.050388] [] kasan_report+0x275/0x360 [ 27.055979] [] ? __lock_acquire+0x2eff/0x3640 [ 27.062089] [] __asan_report_load8_noabort+0x14/0x20 [ 27.068815] [] __lock_acquire+0x2eff/0x3640 [ 27.074755] [] ? __lock_acquire+0x629/0x3640 [ 27.080780] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.087759] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.094740] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.101720] [] ? mark_held_locks+0xaf/0x100 [ 27.107661] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.113859] [] lock_acquire+0x12e/0x410 [ 27.119450] [] ? remove_wait_queue+0x14/0x40 [ 27.125476] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.131762] [] ? remove_wait_queue+0x14/0x40 [ 27.137784] [] remove_wait_queue+0x14/0x40 [ 27.143643] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.150623] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.157861] [] ? ep_free+0x1b0/0x1b0 [ 27.163195] [] ep_free+0x96/0x1b0 [ 27.168266] [] ? ep_free+0x1b0/0x1b0 [ 27.173594] [] ep_eventpoll_release+0x44/0x60 [ 27.179704] [] __fput+0x28c/0x6e0 [ 27.184772] [] ____fput+0x15/0x20 [ 27.189841] [] task_work_run+0x115/0x190 [ 27.195520] [] do_exit+0x7e7/0x2a40 [ 27.200762] [] ? __pmd_alloc+0x410/0x410 [ 27.206442] [] ? release_task+0x1240/0x1240 [ 27.212383] [] ? __do_page_fault+0x5ec/0xd40 [ 27.218406] [] ? up_read+0x1a/0x40 [ 27.223561] [] ? __do_page_fault+0x3bd/0xd40 [ 27.229587] [] do_group_exit+0x108/0x320 [ 27.235264] [] ? do_group_exit+0x320/0x320 [ 27.241114] [] SyS_exit_group+0x1d/0x20 [ 27.246707] [] do_fast_syscall_32+0x2f7/0x890 [ 27.252818] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.259450] [] entry_SYSENTER_compat+0x74/0x83 [ 27.265646] [ 27.267241] Allocated by task 3342: [ 27.270837] save_stack_trace+0x16/0x20 [ 27.274778] save_stack+0x43/0xd0 [ 27.278197] kasan_kmalloc+0xad/0xe0 [ 27.281880] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.286431] binder_get_thread+0x15d/0x750 [ 27.290633] binder_poll+0x4a/0x210 [ 27.294232] SyS_epoll_ctl+0x11d7/0x2190 [ 27.298258] do_fast_syscall_32+0x2f7/0x890 [ 27.302547] entry_SYSENTER_compat+0x74/0x83 [ 27.306921] [ 27.308515] Freed by task 3342: [ 27.311769] save_stack_trace+0x16/0x20 [ 27.315710] save_stack+0x43/0xd0 [ 27.319128] kasan_slab_free+0x72/0xc0 [ 27.322981] kfree+0x103/0x300 [ 27.326143] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.330957] binder_thread_release+0x27d/0x540 [ 27.335505] binder_ioctl+0x9c0/0x11b0 [ 27.339362] compat_SyS_ioctl+0x15f/0x2050 [ 27.343570] do_fast_syscall_32+0x2f7/0x890 [ 27.347860] entry_SYSENTER_compat+0x74/0x83 [ 27.352232] [ 27.353829] The buggy address belongs to the object at ffff8801cd641180 [ 27.353829] which belongs to the cache kmalloc-512 of size 512 [ 27.366450] The buggy address is located 184 bytes inside of [ 27.366450] 512-byte region [ffff8801cd641180, ffff8801cd641380) [ 27.378287] The buggy address belongs to the page: [ 27.383184] page:ffffea0007359000 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.393350] flags: 0x8000000000004080(slab|head) [ 27.398072] page dumped because: kasan: bad access detected [ 27.403747] [ 27.405340] Memory state around the buggy address: [ 27.410234] ffff8801cd641100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.417567] ffff8801cd641180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.424895] >ffff8801cd641200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.432219] ^ [ 27.437377] ffff8801cd641280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.444701] ffff8801cd641300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.452024] ================================================================== [ 27.459350] Disabling lock debugging due to kernel taint [ 27.464766] Kernel panic - not syncing: panic_on_warn set ... [ 27.464766] [ 27.472095] CPU: 0 PID: 3342 Comm: syzkaller258132 Tainted: G B 4.9.76-g8dec074 #23 [ 27.481000] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.490341] ffff8801cd8177c8 ffffffff81d93169 ffffffff84195c2f ffff8801cd8178a0 [ 27.498303] 0000000000000000 ffff8801cd641238 ffff8801cd641238 ffff8801cd817890 [ 27.506273] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 27.514242] Call Trace: [ 27.516801] [] dump_stack+0xc1/0x128 [ 27.522146] [] panic+0x1bc/0x3a8 [ 27.527139] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.535334] [] ? add_taint+0x40/0x50 [ 27.540664] [] kasan_end_report+0x50/0x50 [ 27.546428] [] kasan_report+0x167/0x360 [ 27.552021] [] ? __lock_acquire+0x2eff/0x3640 [ 27.558132] [] __asan_report_load8_noabort+0x14/0x20 [ 27.564850] [] __lock_acquire+0x2eff/0x3640 [ 27.570787] [] ? __lock_acquire+0x629/0x3640 [ 27.576817] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.583797] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.590778] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.597760] [] ? mark_held_locks+0xaf/0x100 [ 27.603699] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.609901] [] lock_acquire+0x12e/0x410 [ 27.615491] [] ? remove_wait_queue+0x14/0x40 [ 27.621516] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.627805] [] ? remove_wait_queue+0x14/0x40 [ 27.633833] [] remove_wait_queue+0x14/0x40 [ 27.639685] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.646667] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.653906] [] ? ep_free+0x1b0/0x1b0 [ 27.659237] [] ep_free+0x96/0x1b0 [ 27.664309] [] ? ep_free+0x1b0/0x1b0 [ 27.669639] [] ep_eventpoll_release+0x44/0x60 [ 27.675752] [] __fput+0x28c/0x6e0 [ 27.680823] [] ____fput+0x15/0x20 [ 27.685893] [] task_work_run+0x115/0x190 [ 27.691570] [] do_exit+0x7e7/0x2a40 [ 27.696812] [] ? __pmd_alloc+0x410/0x410 [ 27.702489] [] ? release_task+0x1240/0x1240 [ 27.708429] [] ? __do_page_fault+0x5ec/0xd40 [ 27.714454] [] ? up_read+0x1a/0x40 [ 27.719612] [] ? __do_page_fault+0x3bd/0xd40 [ 27.725636] [] do_group_exit+0x108/0x320 [ 27.731315] [] ? do_group_exit+0x320/0x320 [ 27.737166] [] SyS_exit_group+0x1d/0x20 [ 27.742760] [] do_fast_syscall_32+0x2f7/0x890 [ 27.748869] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.755501] [] entry_SYSENTER_compat+0x74/0x83 [ 27.762076] Dumping ftrace buffer: [ 27.765588] (ftrace buffer empty) [ 27.769271] Kernel Offset: disabled [ 27.772865] Rebooting in 86400 seconds..