[....] Starting enhanced syslogd: rsyslogd[ 10.704916] audit: type=1400 audit(1515961684.773:4): avc: denied { syslog } for pid=3185 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.15' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.435496] ================================================================== [ 27.436599] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.437515] Read of size 8 at addr ffff8801c8b3b238 by task syzkaller043244/3342 [ 27.438554] [ 27.438826] CPU: 0 PID: 3342 Comm: syzkaller043244 Not tainted 4.9.76-gf0f6293 #22 [ 27.439852] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.441189] ffff8801c813f870 ffffffff81d93149 ffffea000722ce80 ffff8801c8b3b238 [ 27.442432] 0000000000000000 ffff8801c8b3b238 ffff8801c8b3b238 ffff8801c813f8a8 [ 27.443649] ffffffff8153cb43 ffff8801c8b3b238 0000000000000008 0000000000000000 [ 27.444887] Call Trace: [ 27.445267] [] dump_stack+0xc1/0x128 [ 27.445999] [] print_address_description+0x73/0x280 [ 27.446921] [] kasan_report+0x275/0x360 [ 27.447708] [] ? __lock_acquire+0x2eff/0x3640 [ 27.448582] [] __asan_report_load8_noabort+0x14/0x20 [ 27.449472] [] __lock_acquire+0x2eff/0x3640 [ 27.450381] [] ? __lock_acquire+0x629/0x3640 [ 27.451219] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.452175] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.453118] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.454059] [] ? mark_held_locks+0xaf/0x100 [ 27.454893] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.455735] [] lock_acquire+0x12e/0x410 [ 27.461325] [] ? remove_wait_queue+0x14/0x40 [ 27.467349] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.473634] [] ? remove_wait_queue+0x14/0x40 [ 27.479669] [] remove_wait_queue+0x14/0x40 [ 27.485523] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.492504] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.499743] [] ? ep_free+0x1b0/0x1b0 [ 27.505072] [] ep_free+0x96/0x1b0 [ 27.510141] [] ? ep_free+0x1b0/0x1b0 [ 27.515469] [] ep_eventpoll_release+0x44/0x60 [ 27.521579] [] __fput+0x28c/0x6e0 [ 27.526651] [] ____fput+0x15/0x20 [ 27.531723] [] task_work_run+0x115/0x190 [ 27.537401] [] do_exit+0x7e7/0x2a40 [ 27.542648] [] ? __pmd_alloc+0x410/0x410 [ 27.548324] [] ? release_task+0x1240/0x1240 [ 27.554261] [] ? __do_page_fault+0x5ec/0xd40 [ 27.560285] [] ? up_read+0x1a/0x40 [ 27.565442] [] ? __do_page_fault+0x3bd/0xd40 [ 27.571466] [] do_group_exit+0x108/0x320 [ 27.577143] [] ? do_group_exit+0x320/0x320 [ 27.582995] [] SyS_exit_group+0x1d/0x20 [ 27.588583] [] do_fast_syscall_32+0x2f7/0x890 [ 27.594693] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.601324] [] entry_SYSENTER_compat+0x74/0x83 [ 27.607519] [ 27.609113] Allocated by task 3342: [ 27.612708] save_stack_trace+0x16/0x20 [ 27.616647] save_stack+0x43/0xd0 [ 27.620064] kasan_kmalloc+0xad/0xe0 [ 27.623743] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.628291] binder_get_thread+0x15d/0x750 [ 27.632490] binder_poll+0x4a/0x210 [ 27.636082] SyS_epoll_ctl+0x11d7/0x2190 [ 27.640108] do_fast_syscall_32+0x2f7/0x890 [ 27.644395] entry_SYSENTER_compat+0x74/0x83 [ 27.648765] [ 27.650362] Freed by task 3342: [ 27.653606] save_stack_trace+0x16/0x20 [ 27.657544] save_stack+0x43/0xd0 [ 27.660963] kasan_slab_free+0x72/0xc0 [ 27.664818] kfree+0x103/0x300 [ 27.667977] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.672786] binder_thread_release+0x27d/0x540 [ 27.677335] binder_ioctl+0x9c0/0x11b0 [ 27.681189] compat_SyS_ioctl+0x15f/0x2050 [ 27.685388] do_fast_syscall_32+0x2f7/0x890 [ 27.689675] entry_SYSENTER_compat+0x74/0x83 [ 27.694048] [ 27.695643] The buggy address belongs to the object at ffff8801c8b3b180 [ 27.695643] which belongs to the cache kmalloc-512 of size 512 [ 27.708264] The buggy address is located 184 bytes inside of [ 27.708264] 512-byte region [ffff8801c8b3b180, ffff8801c8b3b380) [ 27.720102] The buggy address belongs to the page: [ 27.724999] page:ffffea000722ce80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.735160] flags: 0x8000000000004080(slab|head) [ 27.739879] page dumped because: kasan: bad access detected [ 27.745552] [ 27.747146] Memory state around the buggy address: [ 27.752041] ffff8801c8b3b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.759365] ffff8801c8b3b180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.766691] >ffff8801c8b3b200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.774014] ^ [ 27.779168] ffff8801c8b3b280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.786505] ffff8801c8b3b300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.793828] ================================================================== [ 27.801153] Disabling lock debugging due to kernel taint [ 27.806567] Kernel panic - not syncing: panic_on_warn set ... [ 27.806567] [ 27.813895] CPU: 0 PID: 3342 Comm: syzkaller043244 Tainted: G B 4.9.76-gf0f6293 #22 [ 27.822783] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.832104] ffff8801c813f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801c813f8a0 [ 27.840067] 0000000000000000 ffff8801c8b3b238 ffff8801c8b3b238 ffff8801c813f890 [ 27.848033] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 27.856001] Call Trace: [ 27.858557] [] dump_stack+0xc1/0x128 [ 27.863891] [] panic+0x1bc/0x3a8 [ 27.868876] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.877070] [] ? add_taint+0x40/0x50 [ 27.882411] [] kasan_end_report+0x50/0x50 [ 27.888174] [] kasan_report+0x167/0x360 [ 27.893764] [] ? __lock_acquire+0x2eff/0x3640 [ 27.899875] [] __asan_report_load8_noabort+0x14/0x20 [ 27.906593] [] __lock_acquire+0x2eff/0x3640 [ 27.912530] [] ? __lock_acquire+0x629/0x3640 [ 27.918555] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.925535] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.932516] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.939494] [] ? mark_held_locks+0xaf/0x100 [ 27.945431] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.951628] [] lock_acquire+0x12e/0x410 [ 27.957219] [] ? remove_wait_queue+0x14/0x40 [ 27.963244] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.969529] [] ? remove_wait_queue+0x14/0x40 [ 27.975554] [] remove_wait_queue+0x14/0x40 [ 27.981406] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.988387] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.995625] [] ? ep_free+0x1b0/0x1b0 [ 28.000953] [] ep_free+0x96/0x1b0 [ 28.006022] [] ? ep_free+0x1b0/0x1b0 [ 28.011352] [] ep_eventpoll_release+0x44/0x60 [ 28.017464] [] __fput+0x28c/0x6e0 [ 28.022534] [] ____fput+0x15/0x20 [ 28.027602] [] task_work_run+0x115/0x190 [ 28.033280] [] do_exit+0x7e7/0x2a40 [ 28.038522] [] ? __pmd_alloc+0x410/0x410 [ 28.044199] [] ? release_task+0x1240/0x1240 [ 28.050137] [] ? __do_page_fault+0x5ec/0xd40 [ 28.056162] [] ? up_read+0x1a/0x40 [ 28.061320] [] ? __do_page_fault+0x3bd/0xd40 [ 28.067342] [] do_group_exit+0x108/0x320 [ 28.073020] [] ? do_group_exit+0x320/0x320 [ 28.078873] [] SyS_exit_group+0x1d/0x20 [ 28.084464] [] do_fast_syscall_32+0x2f7/0x890 [ 28.090576] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.097211] [] entry_SYSENTER_compat+0x74/0x83 [ 28.103763] Dumping ftrace buffer: [ 28.107269] (ftrace buffer empty) [ 28.110950] Kernel Offset: disabled [ 28.114542] Rebooting in 86400 seconds..