[....] Starting enhanced syslogd: rsyslogd[ 16.045368] audit: type=1400 audit(1517263323.175:4): avc: denied { syslog } for pid=3904 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.58' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 38.366270] ================================================================== [ 38.373659] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 38.380297] Read of size 8 at addr ffff8801d68b5238 by task syzkaller796189/4069 [ 38.387797] [ 38.389402] CPU: 0 PID: 4069 Comm: syzkaller796189 Not tainted 4.9.78-g7be1985 #33 [ 38.397084] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 38.406413] ffff8801d3fd7870 ffffffff81d94409 ffffea00075a2d00 ffff8801d68b5238 [ 38.414387] 0000000000000000 ffff8801d68b5238 ffff8801d68b5238 ffff8801d3fd78a8 [ 38.422355] ffffffff8153dc73 ffff8801d68b5238 0000000000000008 0000000000000000 [ 38.430324] Call Trace: [ 38.432889] [] dump_stack+0xc1/0x128 [ 38.438235] [] print_address_description+0x73/0x280 [ 38.444871] [] kasan_report+0x275/0x360 [ 38.450476] [] ? __lock_acquire+0x2eff/0x3640 [ 38.456597] [] __asan_report_load8_noabort+0x14/0x20 [ 38.463320] [] __lock_acquire+0x2eff/0x3640 [ 38.469259] [] ? __lock_acquire+0x629/0x3640 [ 38.475287] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.482271] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.489252] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.496233] [] ? mark_held_locks+0xaf/0x100 [ 38.502175] [] ? mutex_lock_nested+0x5e3/0x870 [ 38.508381] [] lock_acquire+0x12e/0x410 [ 38.513985] [] ? remove_wait_queue+0x14/0x40 [ 38.520017] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 38.526306] [] ? remove_wait_queue+0x14/0x40 [ 38.532332] [] remove_wait_queue+0x14/0x40 [ 38.538187] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 38.545177] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 38.552429] [] ? ep_free+0x1b0/0x1b0 [ 38.557767] [] ep_free+0x96/0x1b0 [ 38.562837] [] ? ep_free+0x1b0/0x1b0 [ 38.568166] [] ep_eventpoll_release+0x44/0x60 [ 38.574280] [] __fput+0x28c/0x6e0 [ 38.579360] [] ____fput+0x15/0x20 [ 38.584434] [] task_work_run+0x115/0x190 [ 38.590115] [] do_exit+0x7e7/0x2a40 [ 38.595361] [] ? __pmd_alloc+0x410/0x410 [ 38.601041] [] ? release_task+0x1240/0x1240 [ 38.606982] [] ? __do_page_fault+0x5ec/0xd40 [ 38.613009] [] ? up_read+0x1a/0x40 [ 38.618166] [] ? __do_page_fault+0x3bd/0xd40 [ 38.624194] [] do_group_exit+0x108/0x320 [ 38.629872] [] ? do_group_exit+0x320/0x320 [ 38.635725] [] SyS_exit_group+0x1d/0x20 [ 38.641315] [] do_fast_syscall_32+0x2f7/0x890 [ 38.647429] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.654065] [] entry_SYSENTER_compat+0x74/0x83 [ 38.660274] [ 38.661870] Allocated by task 4069: [ 38.665481] save_stack_trace+0x16/0x20 [ 38.669421] save_stack+0x43/0xd0 [ 38.672844] kasan_kmalloc+0xad/0xe0 [ 38.676525] kmem_cache_alloc_trace+0xfb/0x2a0 [ 38.681083] binder_get_thread+0x15d/0x750 [ 38.685286] binder_poll+0x4a/0x210 [ 38.688880] SyS_epoll_ctl+0x11d7/0x2190 [ 38.692907] do_fast_syscall_32+0x2f7/0x890 [ 38.697196] entry_SYSENTER_compat+0x74/0x83 [ 38.701570] [ 38.703166] Freed by task 4069: [ 38.706421] save_stack_trace+0x16/0x20 [ 38.710363] save_stack+0x43/0xd0 [ 38.713785] kasan_slab_free+0x72/0xc0 [ 38.717638] kfree+0x103/0x300 [ 38.720801] binder_thread_dec_tmpref+0x1cc/0x240 [ 38.725613] binder_thread_release+0x27d/0x540 [ 38.730161] binder_ioctl+0x9c0/0x11b0 [ 38.734016] compat_SyS_ioctl+0x15f/0x2050 [ 38.738218] do_fast_syscall_32+0x2f7/0x890 [ 38.742507] entry_SYSENTER_compat+0x74/0x83 [ 38.746880] [ 38.748480] The buggy address belongs to the object at ffff8801d68b5180 [ 38.748480] which belongs to the cache kmalloc-512 of size 512 [ 38.761103] The buggy address is located 184 bytes inside of [ 38.761103] 512-byte region [ffff8801d68b5180, ffff8801d68b5380) [ 38.772946] The buggy address belongs to the page: [ 38.777851] page:ffffea00075a2d00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 38.788016] flags: 0x8000000000004080(slab|head) [ 38.792740] page dumped because: kasan: bad access detected [ 38.798416] [ 38.800009] Memory state around the buggy address: [ 38.804907] ffff8801d68b5100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 38.812234] ffff8801d68b5180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.819561] >ffff8801d68b5200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.826889] ^ [ 38.832054] ffff8801d68b5280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.839382] ffff8801d68b5300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.846709] ================================================================== [ 38.854035] Disabling lock debugging due to kernel taint [ 38.859454] Kernel panic - not syncing: panic_on_warn set ... [ 38.859454] [ 38.866787] CPU: 0 PID: 4069 Comm: syzkaller796189 Tainted: G B 4.9.78-g7be1985 #33 [ 38.875675] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 38.884998] ffff8801d3fd77c8 ffffffff81d94409 ffffffff841971bf ffff8801d3fd78a0 [ 38.892977] 0000000000000000 ffff8801d68b5238 ffff8801d68b5238 ffff8801d3fd7890 [ 38.900952] ffffffff8142f4a1 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f2e5 [ 38.908915] Call Trace: [ 38.911472] [] dump_stack+0xc1/0x128 [ 38.916804] [] panic+0x1bc/0x3a8 [ 38.921791] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 38.929987] [] ? add_taint+0x40/0x50 [ 38.935331] [] kasan_end_report+0x50/0x50 [ 38.941106] [] kasan_report+0x167/0x360 [ 38.946701] [] ? __lock_acquire+0x2eff/0x3640 [ 38.952814] [] __asan_report_load8_noabort+0x14/0x20 [ 38.959543] [] __lock_acquire+0x2eff/0x3640 [ 38.965485] [] ? __lock_acquire+0x629/0x3640 [ 38.971523] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.978525] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.985515] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 38.992496] [] ? mark_held_locks+0xaf/0x100 [ 38.998440] [] ? mutex_lock_nested+0x5e3/0x870 [ 39.004641] [] lock_acquire+0x12e/0x410 [ 39.010239] [] ? remove_wait_queue+0x14/0x40 [ 39.016272] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 39.022560] [] ? remove_wait_queue+0x14/0x40 [ 39.028586] [] remove_wait_queue+0x14/0x40 [ 39.034444] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 39.041446] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 39.048687] [] ? ep_free+0x1b0/0x1b0 [ 39.054026] [] ep_free+0x96/0x1b0 [ 39.059109] [] ? ep_free+0x1b0/0x1b0 [ 39.064443] [] ep_eventpoll_release+0x44/0x60 [ 39.070558] [] __fput+0x28c/0x6e0 [ 39.075630] [] ____fput+0x15/0x20 [ 39.080709] [] task_work_run+0x115/0x190 [ 39.086390] [] do_exit+0x7e7/0x2a40 [ 39.091634] [] ? __pmd_alloc+0x410/0x410 [ 39.097315] [] ? release_task+0x1240/0x1240 [ 39.103259] [] ? __do_page_fault+0x5ec/0xd40 [ 39.109288] [] ? up_read+0x1a/0x40 [ 39.114450] [] ? __do_page_fault+0x3bd/0xd40 [ 39.120477] [] do_group_exit+0x108/0x320 [ 39.126155] [] ? do_group_exit+0x320/0x320 [ 39.132007] [] SyS_exit_group+0x1d/0x20 [ 39.137610] [] do_fast_syscall_32+0x2f7/0x890 [ 39.143726] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 39.150381] [] entry_SYSENTER_compat+0x74/0x83 [ 39.156965] Dumping ftrace buffer: [ 39.160471] (ftrace buffer empty) [ 39.164149] Kernel Offset: disabled [ 39.167745] Rebooting in 86400 seconds..