[....] Starting enhanced syslogd: rsyslogd[ 15.037875] audit: type=1400 audit(1517473692.641:4): avc: denied { syslog } for pid=3902 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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.17' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.110696] ================================================================== [ 27.118085] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.124721] Read of size 8 at addr ffff8801b756bc38 by task syzkaller903023/4057 [ 27.132306] [ 27.133907] CPU: 0 PID: 4057 Comm: syzkaller903023 Not tainted 4.9.79-g71f1469 #34 [ 27.141577] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.150903] ffff8801d38c7870 ffffffff81d94829 ffffea0006dd5a80 ffff8801b756bc38 [ 27.158866] 0000000000000000 ffff8801b756bc38 ffff8801b756bc38 ffff8801d38c78a8 [ 27.166833] ffffffff8153e083 ffff8801b756bc38 0000000000000008 0000000000000000 [ 27.174798] Call Trace: [ 27.177356] [] dump_stack+0xc1/0x128 [ 27.182690] [] print_address_description+0x73/0x280 [ 27.189327] [] kasan_report+0x275/0x360 [ 27.194926] [] ? __lock_acquire+0x2eff/0x3640 [ 27.201040] [] __asan_report_load8_noabort+0x14/0x20 [ 27.207758] [] __lock_acquire+0x2eff/0x3640 [ 27.213697] [] ? __lock_acquire+0x629/0x3640 [ 27.219723] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.226713] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.233702] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.240699] [] ? mark_held_locks+0xaf/0x100 [ 27.246648] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.252847] [] lock_acquire+0x12e/0x410 [ 27.258438] [] ? remove_wait_queue+0x14/0x40 [ 27.264464] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.270756] [] ? remove_wait_queue+0x14/0x40 [ 27.276788] [] remove_wait_queue+0x14/0x40 [ 27.282641] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.289621] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.296859] [] ? ep_free+0x1b0/0x1b0 [ 27.302189] [] ep_free+0x96/0x1b0 [ 27.307259] [] ? ep_free+0x1b0/0x1b0 [ 27.312594] [] ep_eventpoll_release+0x44/0x60 [ 27.318730] [] __fput+0x28c/0x6e0 [ 27.323807] [] ____fput+0x15/0x20 [ 27.328889] [] task_work_run+0x115/0x190 [ 27.334571] [] do_exit+0x7e7/0x2a40 [ 27.339821] [] ? __pmd_alloc+0x410/0x410 [ 27.345500] [] ? release_task+0x1240/0x1240 [ 27.351451] [] ? __do_page_fault+0x5ec/0xd40 [ 27.357488] [] ? up_read+0x1a/0x40 [ 27.362652] [] ? __do_page_fault+0x3bd/0xd40 [ 27.368677] [] do_group_exit+0x108/0x320 [ 27.374373] [] ? do_group_exit+0x320/0x320 [ 27.380235] [] SyS_exit_group+0x1d/0x20 [ 27.385835] [] do_fast_syscall_32+0x2f7/0x890 [ 27.391948] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.398581] [] entry_SYSENTER_compat+0x74/0x83 [ 27.404780] [ 27.406379] Allocated by task 4057: [ 27.410566] save_stack_trace+0x16/0x20 [ 27.414513] save_stack+0x43/0xd0 [ 27.417931] kasan_kmalloc+0xad/0xe0 [ 27.421611] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.426159] binder_get_thread+0x15d/0x750 [ 27.430381] binder_poll+0x4a/0x210 [ 27.433976] SyS_epoll_ctl+0x11d7/0x2190 [ 27.438005] do_fast_syscall_32+0x2f7/0x890 [ 27.442294] entry_SYSENTER_compat+0x74/0x83 [ 27.446664] [ 27.448259] Freed by task 4057: [ 27.451510] save_stack_trace+0x16/0x20 [ 27.455451] save_stack+0x43/0xd0 [ 27.458868] kasan_slab_free+0x72/0xc0 [ 27.462722] kfree+0x103/0x300 [ 27.465884] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.470694] binder_thread_release+0x27d/0x540 [ 27.475244] binder_ioctl+0x9c0/0x11b0 [ 27.479105] compat_SyS_ioctl+0x15f/0x2050 [ 27.483307] do_fast_syscall_32+0x2f7/0x890 [ 27.487603] entry_SYSENTER_compat+0x74/0x83 [ 27.491984] [ 27.493586] The buggy address belongs to the object at ffff8801b756bb80 [ 27.493586] which belongs to the cache kmalloc-512 of size 512 [ 27.506209] The buggy address is located 184 bytes inside of [ 27.506209] 512-byte region [ffff8801b756bb80, ffff8801b756bd80) [ 27.518049] The buggy address belongs to the page: [ 27.522945] page:ffffea0006dd5a80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.533110] flags: 0x8000000000004080(slab|head) [ 27.537832] page dumped because: kasan: bad access detected [ 27.543505] [ 27.545099] Memory state around the buggy address: [ 27.549994] ffff8801b756bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.557318] ffff8801b756bb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.564641] >ffff8801b756bc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.571967] ^ [ 27.577122] ffff8801b756bc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.584446] ffff8801b756bd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.591776] ================================================================== [ 27.599098] Disabling lock debugging due to kernel taint [ 27.604514] Kernel panic - not syncing: panic_on_warn set ... [ 27.604514] [ 27.611844] CPU: 0 PID: 4057 Comm: syzkaller903023 Tainted: G B 4.9.79-g71f1469 #34 [ 27.620737] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.630059] ffff8801d38c77c8 ffffffff81d94829 ffffffff8419709f ffff8801d38c78a0 [ 27.638016] 0000000000000000 ffff8801b756bc38 ffff8801b756bc38 ffff8801d38c7890 [ 27.645973] ffffffff8142f531 0000000041b58ab3 ffffffff8418ab10 ffffffff8142f375 [ 27.653945] Call Trace: [ 27.656504] [] dump_stack+0xc1/0x128 [ 27.661836] [] panic+0x1bc/0x3a8 [ 27.666819] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.675016] [] ? add_taint+0x40/0x50 [ 27.680349] [] kasan_end_report+0x50/0x50 [ 27.686112] [] kasan_report+0x167/0x360 [ 27.691704] [] ? __lock_acquire+0x2eff/0x3640 [ 27.697823] [] __asan_report_load8_noabort+0x14/0x20 [ 27.704543] [] __lock_acquire+0x2eff/0x3640 [ 27.710485] [] ? __lock_acquire+0x629/0x3640 [ 27.716509] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.723488] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.730467] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.737445] [] ? mark_held_locks+0xaf/0x100 [ 27.743382] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.749581] [] lock_acquire+0x12e/0x410 [ 27.755172] [] ? remove_wait_queue+0x14/0x40 [ 27.761203] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.767496] [] ? remove_wait_queue+0x14/0x40 [ 27.773520] [] remove_wait_queue+0x14/0x40 [ 27.779376] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.786354] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.793600] [] ? ep_free+0x1b0/0x1b0 [ 27.798930] [] ep_free+0x96/0x1b0 [ 27.803998] [] ? ep_free+0x1b0/0x1b0 [ 27.809332] [] ep_eventpoll_release+0x44/0x60 [ 27.815451] [] __fput+0x28c/0x6e0 [ 27.820520] [] ____fput+0x15/0x20 [ 27.825587] [] task_work_run+0x115/0x190 [ 27.831277] [] do_exit+0x7e7/0x2a40 [ 27.836523] [] ? __pmd_alloc+0x410/0x410 [ 27.842201] [] ? release_task+0x1240/0x1240 [ 27.848142] [] ? __do_page_fault+0x5ec/0xd40 [ 27.854168] [] ? up_read+0x1a/0x40 [ 27.859330] [] ? __do_page_fault+0x3bd/0xd40 [ 27.865361] [] do_group_exit+0x108/0x320 [ 27.871039] [] ? do_group_exit+0x320/0x320 [ 27.876889] [] SyS_exit_group+0x1d/0x20 [ 27.882481] [] do_fast_syscall_32+0x2f7/0x890 [ 27.888593] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.895227] [] entry_SYSENTER_compat+0x74/0x83 [ 27.901936] Dumping ftrace buffer: [ 27.905450] (ftrace buffer empty) [ 27.909127] Kernel Offset: disabled [ 27.912729] Rebooting in 86400 seconds..