[....] Starting enhanced syslogd: rsyslogd[ 13.540794] audit: type=1400 audit(1515544236.881:4): avc: denied { syslog } for pid=3179 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.230' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.933972] ================================================================== [ 26.941362] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.947994] Read of size 8 at addr ffff8801cbce7c38 by task syzkaller122442/3335 [ 26.955498] [ 26.957093] CPU: 0 PID: 3335 Comm: syzkaller122442 Not tainted 4.9.75-g8910fa5 #19 [ 26.964761] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.974083] ffff8801cfa67870 ffffffff81d93049 ffffea00072f3980 ffff8801cbce7c38 [ 26.982036] 0000000000000000 ffff8801cbce7c38 ffff8801cbce7c38 ffff8801cfa678a8 [ 26.989988] ffffffff8153ca53 ffff8801cbce7c38 0000000000000008 0000000000000000 [ 26.997937] Call Trace: [ 27.000491] [] dump_stack+0xc1/0x128 [ 27.005820] [] print_address_description+0x73/0x280 [ 27.012448] [] kasan_report+0x275/0x360 [ 27.018036] [] ? __lock_acquire+0x2eff/0x3640 [ 27.024150] [] __asan_report_load8_noabort+0x14/0x20 [ 27.030869] [] __lock_acquire+0x2eff/0x3640 [ 27.036804] [] ? __lock_acquire+0x629/0x3640 [ 27.042825] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.049804] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.056782] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.064692] [] ? mark_held_locks+0xaf/0x100 [ 27.070634] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.076830] [] lock_acquire+0x12e/0x410 [ 27.082417] [] ? remove_wait_queue+0x14/0x40 [ 27.088438] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.094720] [] ? remove_wait_queue+0x14/0x40 [ 27.100741] [] remove_wait_queue+0x14/0x40 [ 27.106591] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.113572] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.120815] [] ? ep_free+0x1b0/0x1b0 [ 27.126142] [] ep_free+0x96/0x1b0 [ 27.131209] [] ? ep_free+0x1b0/0x1b0 [ 27.136542] [] ep_eventpoll_release+0x44/0x60 [ 27.142663] [] __fput+0x28c/0x6e0 [ 27.147730] [] ____fput+0x15/0x20 [ 27.152798] [] task_work_run+0x115/0x190 [ 27.158474] [] do_exit+0x7e7/0x2a40 [ 27.163715] [] ? __pmd_alloc+0x410/0x410 [ 27.169392] [] ? release_task+0x1240/0x1240 [ 27.175327] [] ? __do_page_fault+0x5ec/0xd40 [ 27.181350] [] ? up_read+0x1a/0x40 [ 27.186504] [] ? __do_page_fault+0x3bd/0xd40 [ 27.192531] [] do_group_exit+0x108/0x320 [ 27.198213] [] ? do_group_exit+0x320/0x320 [ 27.204080] [] SyS_exit_group+0x1d/0x20 [ 27.209671] [] do_fast_syscall_32+0x2f7/0x890 [ 27.215781] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.222423] [] entry_SYSENTER_compat+0x74/0x83 [ 27.228623] [ 27.230215] Allocated by task 3335: [ 27.233808] save_stack_trace+0x16/0x20 [ 27.237745] save_stack+0x43/0xd0 [ 27.241161] kasan_kmalloc+0xad/0xe0 [ 27.244839] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.249386] binder_get_thread+0x15d/0x750 [ 27.253590] binder_poll+0x4a/0x210 [ 27.257186] SyS_epoll_ctl+0x11d7/0x2190 [ 27.261210] do_fast_syscall_32+0x2f7/0x890 [ 27.265494] entry_SYSENTER_compat+0x74/0x83 [ 27.269863] [ 27.271453] Freed by task 3335: [ 27.274697] save_stack_trace+0x16/0x20 [ 27.278634] save_stack+0x43/0xd0 [ 27.282049] kasan_slab_free+0x72/0xc0 [ 27.285897] kfree+0x103/0x300 [ 27.289141] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.293948] binder_thread_release+0x27d/0x540 [ 27.298495] binder_ioctl+0x9c0/0x11b0 [ 27.302345] compat_SyS_ioctl+0x15f/0x2050 [ 27.306542] do_fast_syscall_32+0x2f7/0x890 [ 27.310827] entry_SYSENTER_compat+0x74/0x83 [ 27.315195] [ 27.316789] The buggy address belongs to the object at ffff8801cbce7b80 [ 27.316789] which belongs to the cache kmalloc-512 of size 512 [ 27.329408] The buggy address is located 184 bytes inside of [ 27.329408] 512-byte region [ffff8801cbce7b80, ffff8801cbce7d80) [ 27.341243] The buggy address belongs to the page: [ 27.346136] page:ffffea00072f3980 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.356291] flags: 0x8000000000004080(slab|head) [ 27.361008] page dumped because: kasan: bad access detected [ 27.366679] [ 27.368280] Memory state around the buggy address: [ 27.373171] ffff8801cbce7b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.380502] ffff8801cbce7b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.387830] >ffff8801cbce7c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.395153] ^ [ 27.400306] ffff8801cbce7c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.407629] ffff8801cbce7d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.414953] ================================================================== [ 27.422288] Disabling lock debugging due to kernel taint [ 27.427701] Kernel panic - not syncing: panic_on_warn set ... [ 27.427701] [ 27.435036] CPU: 0 PID: 3335 Comm: syzkaller122442 Tainted: G B 4.9.75-g8910fa5 #19 [ 27.443922] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.453251] ffff8801cfa677c8 ffffffff81d93049 ffffffff84195be7 ffff8801cfa678a0 [ 27.461200] 0000000000000000 ffff8801cbce7c38 ffff8801cbce7c38 ffff8801cfa67890 [ 27.469145] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 27.477090] Call Trace: [ 27.479645] [] dump_stack+0xc1/0x128 [ 27.484979] [] panic+0x1bc/0x3a8 [ 27.489967] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.498160] [] ? add_taint+0x40/0x50 [ 27.503495] [] kasan_end_report+0x50/0x50 [ 27.509258] [] kasan_report+0x167/0x360 [ 27.514855] [] ? __lock_acquire+0x2eff/0x3640 [ 27.520969] [] __asan_report_load8_noabort+0x14/0x20 [ 27.527685] [] __lock_acquire+0x2eff/0x3640 [ 27.533620] [] ? __lock_acquire+0x629/0x3640 [ 27.539641] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.546620] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.553616] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.560604] [] ? mark_held_locks+0xaf/0x100 [ 27.566547] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.572746] [] lock_acquire+0x12e/0x410 [ 27.578334] [] ? remove_wait_queue+0x14/0x40 [ 27.584360] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.590641] [] ? remove_wait_queue+0x14/0x40 [ 27.596663] [] remove_wait_queue+0x14/0x40 [ 27.602600] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.609578] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.616820] [] ? ep_free+0x1b0/0x1b0 [ 27.622147] [] ep_free+0x96/0x1b0 [ 27.627224] [] ? ep_free+0x1b0/0x1b0 [ 27.632552] [] ep_eventpoll_release+0x44/0x60 [ 27.638664] [] __fput+0x28c/0x6e0 [ 27.643739] [] ____fput+0x15/0x20 [ 27.648806] [] task_work_run+0x115/0x190 [ 27.654490] [] do_exit+0x7e7/0x2a40 [ 27.659731] [] ? __pmd_alloc+0x410/0x410 [ 27.665407] [] ? release_task+0x1240/0x1240 [ 27.671343] [] ? __do_page_fault+0x5ec/0xd40 [ 27.677372] [] ? up_read+0x1a/0x40 [ 27.682532] [] ? __do_page_fault+0x3bd/0xd40 [ 27.688552] [] do_group_exit+0x108/0x320 [ 27.694228] [] ? do_group_exit+0x320/0x320 [ 27.700083] [] SyS_exit_group+0x1d/0x20 [ 27.705673] [] do_fast_syscall_32+0x2f7/0x890 [ 27.711784] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.718429] [] entry_SYSENTER_compat+0x74/0x83 [ 27.725110] Dumping ftrace buffer: [ 27.728615] (ftrace buffer empty) [ 27.732289] Kernel Offset: disabled [ 27.735880] Rebooting in 86400 seconds..