[....] Starting enhanced syslogd: rsyslogd[ 11.023498] audit: type=1400 audit(1516172614.317:4): avc: denied { syslog } for pid=3176 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.200' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.651974] ================================================================== [ 28.653149] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 28.654051] Read of size 8 at addr ffff8801cc34d238 by task syzkaller129463/3333 [ 28.655050] [ 28.655319] CPU: 1 PID: 3333 Comm: syzkaller129463 Not tainted 4.9.76-g8dec074 #23 [ 28.656347] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.657570] ffff8801c858f870 ffffffff81d93169 ffffea000730d300 ffff8801cc34d238 [ 28.658887] 0000000000000000 ffff8801cc34d238 ffff8801cc34d238 ffff8801c858f8a8 [ 28.660143] ffffffff8153cb43 ffff8801cc34d238 0000000000000008 0000000000000000 [ 28.661354] Call Trace: [ 28.661716] [] dump_stack+0xc1/0x128 [ 28.662432] [] print_address_description+0x73/0x280 [ 28.663390] [] kasan_report+0x275/0x360 [ 28.664173] [] ? __lock_acquire+0x2eff/0x3640 [ 28.665022] [] __asan_report_load8_noabort+0x14/0x20 [ 28.666671] [] __lock_acquire+0x2eff/0x3640 [ 28.667481] [] ? __lock_acquire+0x629/0x3640 [ 28.668324] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.669332] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.670285] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.671224] [] ? mark_held_locks+0xaf/0x100 [ 28.672038] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.678147] [] lock_acquire+0x12e/0x410 [ 28.683741] [] ? remove_wait_queue+0x14/0x40 [ 28.689768] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.696057] [] ? remove_wait_queue+0x14/0x40 [ 28.702087] [] remove_wait_queue+0x14/0x40 [ 28.707953] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.714940] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.722191] [] ? ep_free+0x1b0/0x1b0 [ 28.727528] [] ep_free+0x96/0x1b0 [ 28.732625] [] ? ep_free+0x1b0/0x1b0 [ 28.737958] [] ep_eventpoll_release+0x44/0x60 [ 28.744072] [] __fput+0x28c/0x6e0 [ 28.749144] [] ____fput+0x15/0x20 [ 28.754216] [] task_work_run+0x115/0x190 [ 28.759908] [] do_exit+0x7e7/0x2a40 [ 28.765165] [] ? __pmd_alloc+0x410/0x410 [ 28.770844] [] ? release_task+0x1240/0x1240 [ 28.776787] [] ? __do_page_fault+0x5ec/0xd40 [ 28.782817] [] ? up_read+0x1a/0x40 [ 28.787984] [] ? __do_page_fault+0x3bd/0xd40 [ 28.794025] [] do_group_exit+0x108/0x320 [ 28.799706] [] ? do_group_exit+0x320/0x320 [ 28.805558] [] SyS_exit_group+0x1d/0x20 [ 28.811154] [] do_fast_syscall_32+0x2f7/0x890 [ 28.817296] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.823934] [] entry_SYSENTER_compat+0x74/0x83 [ 28.830131] [ 28.831730] Allocated by task 3333: [ 28.835328] save_stack_trace+0x16/0x20 [ 28.839271] save_stack+0x43/0xd0 [ 28.842695] kasan_kmalloc+0xad/0xe0 [ 28.846382] kmem_cache_alloc_trace+0xfb/0x2a0 [ 28.850931] binder_get_thread+0x15d/0x750 [ 28.855132] binder_poll+0x4a/0x210 [ 28.858730] SyS_epoll_ctl+0x11d7/0x2190 [ 28.862761] do_fast_syscall_32+0x2f7/0x890 [ 28.867050] entry_SYSENTER_compat+0x74/0x83 [ 28.871439] [ 28.873046] Freed by task 3333: [ 28.876296] save_stack_trace+0x16/0x20 [ 28.880238] save_stack+0x43/0xd0 [ 28.883659] kasan_slab_free+0x72/0xc0 [ 28.887512] kfree+0x103/0x300 [ 28.890675] binder_thread_dec_tmpref+0x1cc/0x240 [ 28.895497] binder_thread_release+0x27d/0x540 [ 28.900046] binder_ioctl+0x9c0/0x11b0 [ 28.903901] compat_SyS_ioctl+0x15f/0x2050 [ 28.908106] do_fast_syscall_32+0x2f7/0x890 [ 28.912398] entry_SYSENTER_compat+0x74/0x83 [ 28.916771] [ 28.918373] The buggy address belongs to the object at ffff8801cc34d180 [ 28.918373] which belongs to the cache kmalloc-512 of size 512 [ 28.931009] The buggy address is located 184 bytes inside of [ 28.931009] 512-byte region [ffff8801cc34d180, ffff8801cc34d380) [ 28.942864] The buggy address belongs to the page: [ 28.947767] page:ffffea000730d300 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.957930] flags: 0x8000000000004080(slab|head) [ 28.962650] page dumped because: kasan: bad access detected [ 28.968326] [ 28.969922] Memory state around the buggy address: [ 28.974818] ffff8801cc34d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.982144] ffff8801cc34d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.989473] >ffff8801cc34d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.996801] ^ [ 29.001969] ffff8801cc34d280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.009295] ffff8801cc34d300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.016619] ================================================================== [ 29.023944] Disabling lock debugging due to kernel taint [ 29.029379] Kernel panic - not syncing: panic_on_warn set ... [ 29.029379] [ 29.036714] CPU: 1 PID: 3333 Comm: syzkaller129463 Tainted: G B 4.9.76-g8dec074 #23 [ 29.045602] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.054929] ffff8801c858f7c8 ffffffff81d93169 ffffffff84195c2f ffff8801c858f8a0 [ 29.062900] 0000000000000000 ffff8801cc34d238 ffff8801cc34d238 ffff8801c858f890 [ 29.070863] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 29.078829] Call Trace: [ 29.081399] [] dump_stack+0xc1/0x128 [ 29.086737] [] panic+0x1bc/0x3a8 [ 29.091722] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 29.099922] [] ? add_taint+0x40/0x50 [ 29.105256] [] kasan_end_report+0x50/0x50 [ 29.111022] [] kasan_report+0x167/0x360 [ 29.116615] [] ? __lock_acquire+0x2eff/0x3640 [ 29.122742] [] __asan_report_load8_noabort+0x14/0x20 [ 29.129464] [] __lock_acquire+0x2eff/0x3640 [ 29.135408] [] ? __lock_acquire+0x629/0x3640 [ 29.141435] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.148420] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.155400] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.162385] [] ? mark_held_locks+0xaf/0x100 [ 29.168328] [] ? mutex_lock_nested+0x5e3/0x870 [ 29.174530] [] lock_acquire+0x12e/0x410 [ 29.180123] [] ? remove_wait_queue+0x14/0x40 [ 29.186171] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 29.192469] [] ? remove_wait_queue+0x14/0x40 [ 29.198496] [] remove_wait_queue+0x14/0x40 [ 29.204369] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 29.211355] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 29.218598] [] ? ep_free+0x1b0/0x1b0 [ 29.223936] [] ep_free+0x96/0x1b0 [ 29.229009] [] ? ep_free+0x1b0/0x1b0 [ 29.234347] [] ep_eventpoll_release+0x44/0x60 [ 29.240461] [] __fput+0x28c/0x6e0 [ 29.245535] [] ____fput+0x15/0x20 [ 29.250605] [] task_work_run+0x115/0x190 [ 29.256285] [] do_exit+0x7e7/0x2a40 [ 29.261534] [] ? __pmd_alloc+0x410/0x410 [ 29.267213] [] ? release_task+0x1240/0x1240 [ 29.273157] [] ? __do_page_fault+0x5ec/0xd40 [ 29.279188] [] ? up_read+0x1a/0x40 [ 29.284348] [] ? __do_page_fault+0x3bd/0xd40 [ 29.290376] [] do_group_exit+0x108/0x320 [ 29.296055] [] ? do_group_exit+0x320/0x320 [ 29.301907] [] SyS_exit_group+0x1d/0x20 [ 29.307499] [] do_fast_syscall_32+0x2f7/0x890 [ 29.313613] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.320270] [] entry_SYSENTER_compat+0x74/0x83 [ 29.326871] Dumping ftrace buffer: [ 29.330379] (ftrace buffer empty) [ 29.334056] Kernel Offset: disabled [ 29.337654] Rebooting in 86400 seconds..