[....] Starting enhanced syslogd: rsyslogd[ 13.233837] audit: type=1400 audit(1515956906.398:4): avc: denied { syslog } for pid=3173 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.39' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.004123] ================================================================== [ 26.011519] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.018155] Read of size 8 at addr ffff8801cd06aab8 by task syzkaller947357/3329 [ 26.025661] [ 26.027262] CPU: 0 PID: 3329 Comm: syzkaller947357 Not tainted 4.9.76-gf0f6293 #22 [ 26.034936] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.044263] ffff8801c84f7870 ffffffff81d93149 ffffea0007341a80 ffff8801cd06aab8 [ 26.052260] 0000000000000000 ffff8801cd06aab8 ffff8801cd06aab8 ffff8801c84f78a8 [ 26.060223] ffffffff8153cb43 ffff8801cd06aab8 0000000000000008 0000000000000000 [ 26.068204] Call Trace: [ 26.070764] [] dump_stack+0xc1/0x128 [ 26.076101] [] print_address_description+0x73/0x280 [ 26.082739] [] kasan_report+0x275/0x360 [ 26.088335] [] ? __lock_acquire+0x2eff/0x3640 [ 26.094469] [] __asan_report_load8_noabort+0x14/0x20 [ 26.101215] [] __lock_acquire+0x2eff/0x3640 [ 26.107164] [] ? __lock_acquire+0x629/0x3640 [ 26.113195] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.120185] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.127167] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.134151] [] ? mark_held_locks+0xaf/0x100 [ 26.140096] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.146306] [] lock_acquire+0x12e/0x410 [ 26.151900] [] ? remove_wait_queue+0x14/0x40 [ 26.157934] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.164221] [] ? remove_wait_queue+0x14/0x40 [ 26.170257] [] remove_wait_queue+0x14/0x40 [ 26.176118] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.183103] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.190346] [] ? ep_free+0x1b0/0x1b0 [ 26.195679] [] ep_free+0x96/0x1b0 [ 26.200755] [] ? ep_free+0x1b0/0x1b0 [ 26.206096] [] ep_eventpoll_release+0x44/0x60 [ 26.212216] [] __fput+0x28c/0x6e0 [ 26.217289] [] ____fput+0x15/0x20 [ 26.222374] [] task_work_run+0x115/0x190 [ 26.228056] [] do_exit+0x7e7/0x2a40 [ 26.233312] [] ? __pmd_alloc+0x410/0x410 [ 26.238993] [] ? release_task+0x1240/0x1240 [ 26.244936] [] ? __do_page_fault+0x5ec/0xd40 [ 26.250963] [] ? up_read+0x1a/0x40 [ 26.256123] [] ? __do_page_fault+0x3bd/0xd40 [ 26.262158] [] do_group_exit+0x108/0x320 [ 26.267842] [] ? do_group_exit+0x320/0x320 [ 26.273700] [] SyS_exit_group+0x1d/0x20 [ 26.279300] [] do_fast_syscall_32+0x2f7/0x890 [ 26.285417] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.292055] [] entry_SYSENTER_compat+0x74/0x83 [ 26.298253] [ 26.299853] Allocated by task 3329: [ 26.303457] save_stack_trace+0x16/0x20 [ 26.307401] save_stack+0x43/0xd0 [ 26.310823] kasan_kmalloc+0xad/0xe0 [ 26.314503] kmem_cache_alloc_trace+0xfb/0x2a0 [ 26.319057] binder_get_thread+0x15d/0x750 [ 26.323349] binder_poll+0x4a/0x210 [ 26.326948] SyS_epoll_ctl+0x11d7/0x2190 [ 26.330978] do_fast_syscall_32+0x2f7/0x890 [ 26.335279] entry_SYSENTER_compat+0x74/0x83 [ 26.339652] [ 26.341251] Freed by task 3329: [ 26.344499] save_stack_trace+0x16/0x20 [ 26.348440] save_stack+0x43/0xd0 [ 26.351876] kasan_slab_free+0x72/0xc0 [ 26.355730] kfree+0x103/0x300 [ 26.358892] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.363704] binder_thread_release+0x27d/0x540 [ 26.368262] binder_ioctl+0x9c0/0x11b0 [ 26.372119] compat_SyS_ioctl+0x15f/0x2050 [ 26.376322] do_fast_syscall_32+0x2f7/0x890 [ 26.380616] entry_SYSENTER_compat+0x74/0x83 [ 26.384991] [ 26.386595] The buggy address belongs to the object at ffff8801cd06aa00 [ 26.386595] which belongs to the cache kmalloc-512 of size 512 [ 26.399227] The buggy address is located 184 bytes inside of [ 26.399227] 512-byte region [ffff8801cd06aa00, ffff8801cd06ac00) [ 26.411079] The buggy address belongs to the page: [ 26.415979] page:ffffea0007341a80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.426154] flags: 0x8000000000004080(slab|head) [ 26.430876] page dumped because: kasan: bad access detected [ 26.436560] [ 26.438160] Memory state around the buggy address: [ 26.443073] ffff8801cd06a980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.450416] ffff8801cd06aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.457749] >ffff8801cd06aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.465077] ^ [ 26.470233] ffff8801cd06ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.477563] ffff8801cd06ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.484899] ================================================================== [ 26.492228] Disabling lock debugging due to kernel taint [ 26.497648] Kernel panic - not syncing: panic_on_warn set ... [ 26.497648] [ 26.504990] CPU: 0 PID: 3329 Comm: syzkaller947357 Tainted: G B 4.9.76-gf0f6293 #22 [ 26.513881] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.523207] ffff8801c84f77c8 ffffffff81d93149 ffffffff84195c17 ffff8801c84f78a0 [ 26.531181] 0000000000000000 ffff8801cd06aab8 ffff8801cd06aab8 ffff8801c84f7890 [ 26.539151] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 26.547123] Call Trace: [ 26.549686] [] dump_stack+0xc1/0x128 [ 26.555020] [] panic+0x1bc/0x3a8 [ 26.560006] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.568209] [] ? add_taint+0x40/0x50 [ 26.573545] [] kasan_end_report+0x50/0x50 [ 26.579311] [] kasan_report+0x167/0x360 [ 26.584906] [] ? __lock_acquire+0x2eff/0x3640 [ 26.591023] [] __asan_report_load8_noabort+0x14/0x20 [ 26.597745] [] __lock_acquire+0x2eff/0x3640 [ 26.603688] [] ? __lock_acquire+0x629/0x3640 [ 26.609716] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.616701] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.623687] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.630672] [] ? mark_held_locks+0xaf/0x100 [ 26.636616] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.642817] [] lock_acquire+0x12e/0x410 [ 26.648422] [] ? remove_wait_queue+0x14/0x40 [ 26.654451] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.660744] [] ? remove_wait_queue+0x14/0x40 [ 26.666779] [] remove_wait_queue+0x14/0x40 [ 26.672634] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.679630] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.686888] [] ? ep_free+0x1b0/0x1b0 [ 26.692230] [] ep_free+0x96/0x1b0 [ 26.697303] [] ? ep_free+0x1b0/0x1b0 [ 26.702643] [] ep_eventpoll_release+0x44/0x60 [ 26.709193] [] __fput+0x28c/0x6e0 [ 26.714283] [] ____fput+0x15/0x20 [ 26.719359] [] task_work_run+0x115/0x190 [ 26.725041] [] do_exit+0x7e7/0x2a40 [ 26.730291] [] ? __pmd_alloc+0x410/0x410 [ 26.735979] [] ? release_task+0x1240/0x1240 [ 26.741930] [] ? __do_page_fault+0x5ec/0xd40 [ 26.747960] [] ? up_read+0x1a/0x40 [ 26.753129] [] ? __do_page_fault+0x3bd/0xd40 [ 26.759157] [] do_group_exit+0x108/0x320 [ 26.764841] [] ? do_group_exit+0x320/0x320 [ 26.770695] [] SyS_exit_group+0x1d/0x20 [ 26.776291] [] do_fast_syscall_32+0x2f7/0x890 [ 26.782415] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.789053] [] entry_SYSENTER_compat+0x74/0x83 [ 26.795694] Dumping ftrace buffer: [ 26.799222] (ftrace buffer empty) [ 26.802903] Kernel Offset: disabled [ 26.806500] Rebooting in 86400 seconds..