[....] Starting enhanced syslogd: rsyslogd[ 11.467882] audit: type=1400 audit(1515825207.378:4): avc: denied { syslog } for pid=3183 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.55' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.137723] ================================================================== [ 28.145114] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 28.151752] Read of size 8 at addr ffff8801c8afc0b8 by task syzkaller737129/3340 [ 28.159250] [ 28.160845] CPU: 0 PID: 3340 Comm: syzkaller737129 Not tainted 4.9.76-g8e170a5 #21 [ 28.168523] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.177852] ffff8801c862f870 ffffffff81d93149 ffffea000722bf00 ffff8801c8afc0b8 [ 28.185799] 0000000000000000 ffff8801c8afc0b8 ffff8801c8afc0b8 ffff8801c862f8a8 [ 28.193743] ffffffff8153cb43 ffff8801c8afc0b8 0000000000000008 0000000000000000 [ 28.201693] Call Trace: [ 28.204248] [] dump_stack+0xc1/0x128 [ 28.209578] [] print_address_description+0x73/0x280 [ 28.216211] [] kasan_report+0x275/0x360 [ 28.221805] [] ? __lock_acquire+0x2eff/0x3640 [ 28.227917] [] __asan_report_load8_noabort+0x14/0x20 [ 28.234635] [] __lock_acquire+0x2eff/0x3640 [ 28.240589] [] ? __lock_acquire+0x629/0x3640 [ 28.246614] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.253595] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.260635] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.267619] [] ? mark_held_locks+0xaf/0x100 [ 28.273567] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.279778] [] lock_acquire+0x12e/0x410 [ 28.285369] [] ? remove_wait_queue+0x14/0x40 [ 28.291392] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.297675] [] ? remove_wait_queue+0x14/0x40 [ 28.303698] [] remove_wait_queue+0x14/0x40 [ 28.309546] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.316524] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.323762] [] ? ep_free+0x1b0/0x1b0 [ 28.329089] [] ep_free+0x96/0x1b0 [ 28.334155] [] ? ep_free+0x1b0/0x1b0 [ 28.339483] [] ep_eventpoll_release+0x44/0x60 [ 28.345595] [] __fput+0x28c/0x6e0 [ 28.350664] [] ____fput+0x15/0x20 [ 28.355732] [] task_work_run+0x115/0x190 [ 28.361410] [] do_exit+0x7e7/0x2a40 [ 28.366657] [] ? __pmd_alloc+0x410/0x410 [ 28.372339] [] ? release_task+0x1240/0x1240 [ 28.378279] [] ? __do_page_fault+0x5ec/0xd40 [ 28.384303] [] ? up_read+0x1a/0x40 [ 28.389458] [] ? __do_page_fault+0x3bd/0xd40 [ 28.395481] [] do_group_exit+0x108/0x320 [ 28.401162] [] ? do_group_exit+0x320/0x320 [ 28.407012] [] SyS_exit_group+0x1d/0x20 [ 28.413642] [] do_fast_syscall_32+0x2f7/0x890 [ 28.419751] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.426386] [] entry_SYSENTER_compat+0x74/0x83 [ 28.432586] [ 28.434179] Allocated by task 3340: [ 28.437776] save_stack_trace+0x16/0x20 [ 28.441713] save_stack+0x43/0xd0 [ 28.445130] kasan_kmalloc+0xad/0xe0 [ 28.448823] kmem_cache_alloc_trace+0xfb/0x2a0 [ 28.453376] binder_get_thread+0x15d/0x750 [ 28.457585] binder_poll+0x4a/0x210 [ 28.461190] SyS_epoll_ctl+0x11d7/0x2190 [ 28.465215] do_fast_syscall_32+0x2f7/0x890 [ 28.469512] entry_SYSENTER_compat+0x74/0x83 [ 28.473881] [ 28.475482] Freed by task 3340: [ 28.478724] save_stack_trace+0x16/0x20 [ 28.482661] save_stack+0x43/0xd0 [ 28.486080] kasan_slab_free+0x72/0xc0 [ 28.489944] kfree+0x103/0x300 [ 28.493100] binder_thread_dec_tmpref+0x1cc/0x240 [ 28.497914] binder_thread_release+0x27d/0x540 [ 28.502468] binder_ioctl+0x9c0/0x11b0 [ 28.506319] compat_SyS_ioctl+0x15f/0x2050 [ 28.510520] do_fast_syscall_32+0x2f7/0x890 [ 28.514813] entry_SYSENTER_compat+0x74/0x83 [ 28.519184] [ 28.520777] The buggy address belongs to the object at ffff8801c8afc000 [ 28.520777] which belongs to the cache kmalloc-512 of size 512 [ 28.533395] The buggy address is located 184 bytes inside of [ 28.533395] 512-byte region [ffff8801c8afc000, ffff8801c8afc200) [ 28.545237] The buggy address belongs to the page: [ 28.550136] page:ffffea000722bf00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.560288] flags: 0x8000000000004080(slab|head) [ 28.565006] page dumped because: kasan: bad access detected [ 28.570679] [ 28.572272] Memory state around the buggy address: [ 28.577164] ffff8801c8afbf80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 28.584487] ffff8801c8afc000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.591807] >ffff8801c8afc080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.599137] ^ [ 28.604293] ffff8801c8afc100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.611618] ffff8801c8afc180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.618951] ================================================================== [ 28.626276] Disabling lock debugging due to kernel taint [ 28.631689] Kernel panic - not syncing: panic_on_warn set ... [ 28.631689] [ 28.639017] CPU: 0 PID: 3340 Comm: syzkaller737129 Tainted: G B 4.9.76-g8e170a5 #21 [ 28.647902] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.657223] ffff8801c862f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801c862f8a0 [ 28.665178] 0000000000000000 ffff8801c8afc0b8 ffff8801c8afc0b8 ffff8801c862f890 [ 28.673125] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 28.681078] Call Trace: [ 28.683638] [] dump_stack+0xc1/0x128 [ 28.688973] [] panic+0x1bc/0x3a8 [ 28.693962] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 28.702155] [] ? add_taint+0x40/0x50 [ 28.707491] [] kasan_end_report+0x50/0x50 [ 28.713268] [] kasan_report+0x167/0x360 [ 28.718860] [] ? __lock_acquire+0x2eff/0x3640 [ 28.724971] [] __asan_report_load8_noabort+0x14/0x20 [ 28.731689] [] __lock_acquire+0x2eff/0x3640 [ 28.737634] [] ? __lock_acquire+0x629/0x3640 [ 28.743664] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.750643] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.757622] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.764603] [] ? mark_held_locks+0xaf/0x100 [ 28.770545] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.776742] [] lock_acquire+0x12e/0x410 [ 28.782329] [] ? remove_wait_queue+0x14/0x40 [ 28.788359] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.794648] [] ? remove_wait_queue+0x14/0x40 [ 28.800671] [] remove_wait_queue+0x14/0x40 [ 28.806521] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.813761] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.821005] [] ? ep_free+0x1b0/0x1b0 [ 28.826343] [] ep_free+0x96/0x1b0 [ 28.831416] [] ? ep_free+0x1b0/0x1b0 [ 28.836744] [] ep_eventpoll_release+0x44/0x60 [ 28.842857] [] __fput+0x28c/0x6e0 [ 28.847926] [] ____fput+0x15/0x20 [ 28.853001] [] task_work_run+0x115/0x190 [ 28.858684] [] do_exit+0x7e7/0x2a40 [ 28.864101] [] ? __pmd_alloc+0x410/0x410 [ 28.869782] [] ? release_task+0x1240/0x1240 [ 28.875721] [] ? __do_page_fault+0x5ec/0xd40 [ 28.881743] [] ? up_read+0x1a/0x40 [ 28.886897] [] ? __do_page_fault+0x3bd/0xd40 [ 28.892919] [] do_group_exit+0x108/0x320 [ 28.898605] [] ? do_group_exit+0x320/0x320 [ 28.904468] [] SyS_exit_group+0x1d/0x20 [ 28.910062] [] do_fast_syscall_32+0x2f7/0x890 [ 28.916177] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.922814] [] entry_SYSENTER_compat+0x74/0x83 [ 28.929399] Dumping ftrace buffer: [ 28.932908] (ftrace buffer empty) [ 28.936584] Kernel Offset: disabled [ 28.940176] Rebooting in 86400 seconds..