[....] Starting enhanced syslogd: rsyslogd[ 10.527125] audit: type=1400 audit(1515609977.432:4): avc: denied { syslog } for pid=3182 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.15.226' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.564288] ================================================================== [ 28.565362] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 28.566236] Read of size 8 at addr ffff8801c84c7738 by task syzkaller196849/3339 [ 28.567245] [ 28.567474] CPU: 1 PID: 3339 Comm: syzkaller196849 Not tainted 4.9.76-g9154940 #20 [ 28.568644] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.569861] ffff8801c868f870 ffffffff81d93149 ffffea0007213180 ffff8801c84c7738 [ 28.570985] 0000000000000000 ffff8801c84c7738 ffff8801c84c7738 ffff8801c868f8a8 [ 28.572112] ffffffff8153cb43 ffff8801c84c7738 0000000000000008 0000000000000000 [ 28.573324] Call Trace: [ 28.573712] [] dump_stack+0xc1/0x128 [ 28.574440] [] print_address_description+0x73/0x280 [ 28.575314] [] kasan_report+0x275/0x360 [ 28.576099] [] ? __lock_acquire+0x2eff/0x3640 [ 28.576940] [] __asan_report_load8_noabort+0x14/0x20 [ 28.577861] [] __lock_acquire+0x2eff/0x3640 [ 28.578669] [] ? __lock_acquire+0x629/0x3640 [ 28.579485] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.580406] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.581370] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.582300] [] ? mark_held_locks+0xaf/0x100 [ 28.583088] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.583929] [] lock_acquire+0x12e/0x410 [ 28.586591] [] ? remove_wait_queue+0x14/0x40 [ 28.592615] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.598899] [] ? remove_wait_queue+0x14/0x40 [ 28.604925] [] remove_wait_queue+0x14/0x40 [ 28.610776] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.617755] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.624994] [] ? ep_free+0x1b0/0x1b0 [ 28.630322] [] ep_free+0x96/0x1b0 [ 28.635394] [] ? ep_free+0x1b0/0x1b0 [ 28.640728] [] ep_eventpoll_release+0x44/0x60 [ 28.646841] [] __fput+0x28c/0x6e0 [ 28.651910] [] ____fput+0x15/0x20 [ 28.656978] [] task_work_run+0x115/0x190 [ 28.662655] [] do_exit+0x7e7/0x2a40 [ 28.667896] [] ? __pmd_alloc+0x410/0x410 [ 28.673570] [] ? release_task+0x1240/0x1240 [ 28.679507] [] ? __do_page_fault+0x5ec/0xd40 [ 28.685534] [] ? up_read+0x1a/0x40 [ 28.690688] [] ? __do_page_fault+0x3bd/0xd40 [ 28.696712] [] do_group_exit+0x108/0x320 [ 28.702390] [] ? do_group_exit+0x320/0x320 [ 28.708238] [] SyS_exit_group+0x1d/0x20 [ 28.713827] [] do_fast_syscall_32+0x2f7/0x890 [ 28.720367] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.727001] [] entry_SYSENTER_compat+0x74/0x83 [ 28.733195] [ 28.734802] Allocated by task 3339: [ 28.738395] save_stack_trace+0x16/0x20 [ 28.742334] save_stack+0x43/0xd0 [ 28.745751] kasan_kmalloc+0xad/0xe0 [ 28.749426] kmem_cache_alloc_trace+0xfb/0x2a0 [ 28.753977] binder_get_thread+0x15d/0x750 [ 28.758174] binder_poll+0x4a/0x210 [ 28.761775] SyS_epoll_ctl+0x11d7/0x2190 [ 28.765800] do_fast_syscall_32+0x2f7/0x890 [ 28.770082] entry_SYSENTER_compat+0x74/0x83 [ 28.774452] [ 28.776042] Freed by task 3339: [ 28.779284] save_stack_trace+0x16/0x20 [ 28.783222] save_stack+0x43/0xd0 [ 28.786637] kasan_slab_free+0x72/0xc0 [ 28.790486] kfree+0x103/0x300 [ 28.793653] binder_thread_dec_tmpref+0x1cc/0x240 [ 28.798555] binder_thread_release+0x27d/0x540 [ 28.803100] binder_ioctl+0x9c0/0x11b0 [ 28.806951] compat_SyS_ioctl+0x15f/0x2050 [ 28.811155] do_fast_syscall_32+0x2f7/0x890 [ 28.815441] entry_SYSENTER_compat+0x74/0x83 [ 28.819808] [ 28.821401] The buggy address belongs to the object at ffff8801c84c7680 [ 28.821401] which belongs to the cache kmalloc-512 of size 512 [ 28.834019] The buggy address is located 184 bytes inside of [ 28.834019] 512-byte region [ffff8801c84c7680, ffff8801c84c7880) [ 28.845856] The buggy address belongs to the page: [ 28.850747] page:ffffea0007213180 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.860897] flags: 0x8000000000004080(slab|head) [ 28.865613] page dumped because: kasan: bad access detected [ 28.871283] [ 28.872875] Memory state around the buggy address: [ 28.877767] ffff8801c84c7600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.885096] ffff8801c84c7680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.892417] >ffff8801c84c7700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.899737] ^ [ 28.904888] ffff8801c84c7780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.912218] ffff8801c84c7800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.919543] ================================================================== [ 28.926863] Disabling lock debugging due to kernel taint [ 28.932274] Kernel panic - not syncing: panic_on_warn set ... [ 28.932274] [ 28.939605] CPU: 1 PID: 3339 Comm: syzkaller196849 Tainted: G B 4.9.76-g9154940 #20 [ 28.948489] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.957806] ffff8801c868f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801c868f8a0 [ 28.965744] 0000000000000000 ffff8801c84c7738 ffff8801c84c7738 ffff8801c868f890 [ 28.973683] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 28.981645] Call Trace: [ 28.984199] [] dump_stack+0xc1/0x128 [ 28.989528] [] panic+0x1bc/0x3a8 [ 28.994507] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 29.002699] [] ? add_taint+0x40/0x50 [ 29.008028] [] kasan_end_report+0x50/0x50 [ 29.013789] [] kasan_report+0x167/0x360 [ 29.019376] [] ? __lock_acquire+0x2eff/0x3640 [ 29.025482] [] __asan_report_load8_noabort+0x14/0x20 [ 29.032198] [] __lock_acquire+0x2eff/0x3640 [ 29.038133] [] ? __lock_acquire+0x629/0x3640 [ 29.044153] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.051130] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.058109] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.065088] [] ? mark_held_locks+0xaf/0x100 [ 29.071027] [] ? mutex_lock_nested+0x5e3/0x870 [ 29.077223] [] lock_acquire+0x12e/0x410 [ 29.082810] [] ? remove_wait_queue+0x14/0x40 [ 29.088831] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 29.095112] [] ? remove_wait_queue+0x14/0x40 [ 29.101138] [] remove_wait_queue+0x14/0x40 [ 29.106990] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 29.113965] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 29.121201] [] ? ep_free+0x1b0/0x1b0 [ 29.126529] [] ep_free+0x96/0x1b0 [ 29.131595] [] ? ep_free+0x1b0/0x1b0 [ 29.136922] [] ep_eventpoll_release+0x44/0x60 [ 29.143030] [] __fput+0x28c/0x6e0 [ 29.148097] [] ____fput+0x15/0x20 [ 29.153163] [] task_work_run+0x115/0x190 [ 29.158837] [] do_exit+0x7e7/0x2a40 [ 29.164081] [] ? __pmd_alloc+0x410/0x410 [ 29.169755] [] ? release_task+0x1240/0x1240 [ 29.175690] [] ? __do_page_fault+0x5ec/0xd40 [ 29.181712] [] ? up_read+0x1a/0x40 [ 29.186866] [] ? __do_page_fault+0x3bd/0xd40 [ 29.192887] [] do_group_exit+0x108/0x320 [ 29.198564] [] ? do_group_exit+0x320/0x320 [ 29.204413] [] SyS_exit_group+0x1d/0x20 [ 29.210001] [] do_fast_syscall_32+0x2f7/0x890 [ 29.216108] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 29.222738] [] entry_SYSENTER_compat+0x74/0x83 [ 29.229664] Dumping ftrace buffer: [ 29.233169] (ftrace buffer empty) [ 29.236843] Kernel Offset: disabled [ 29.240433] Rebooting in 86400 seconds..