[....] Starting enhanced syslogd: rsyslogd[ 11.369586] audit: type=1400 audit(1514566084.540:4): avc: denied { syslog } for pid=3172 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.33' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.133602] ================================================================== [ 20.134829] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.135810] Read of size 8 at addr ffff8801cd2954b8 by task syzkaller993099/3322 [ 20.137290] [ 20.137697] CPU: 1 PID: 3322 Comm: syzkaller993099 Not tainted 4.9.72-gcb7518e #114 [ 20.138979] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.140255] ffff8801c887f8e0 ffffffff81d922b9 ffffea000734a500 ffff8801cd2954b8 [ 20.141462] 0000000000000000 ffff8801cd2954b8 ffff8801cd2954b8 ffff8801c887f918 [ 20.142702] ffffffff8153bab3 ffff8801cd2954b8 0000000000000008 0000000000000000 [ 20.143943] Call Trace: [ 20.144347] [] dump_stack+0xc1/0x128 [ 20.145109] [] print_address_description+0x73/0x280 [ 20.146106] [] kasan_report+0x275/0x360 [ 20.146856] [] ? __lock_acquire+0x2eff/0x3640 [ 20.147692] [] __asan_report_load8_noabort+0x14/0x20 [ 20.148624] [] __lock_acquire+0x2eff/0x3640 [ 20.149409] [] ? __lock_acquire+0x629/0x3640 [ 20.150270] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.151678] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.153013] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.156042] [] ? mark_held_locks+0xaf/0x100 [ 20.161999] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.168202] [] lock_acquire+0x12e/0x410 [ 20.173804] [] ? remove_wait_queue+0x14/0x40 [ 20.179838] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.186123] [] ? remove_wait_queue+0x14/0x40 [ 20.192145] [] remove_wait_queue+0x14/0x40 [ 20.197995] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.204975] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.212232] [] ? ep_free+0x1b0/0x1b0 [ 20.217745] [] ep_free+0x96/0x1b0 [ 20.222814] [] ? ep_free+0x1b0/0x1b0 [ 20.228150] [] ep_eventpoll_release+0x44/0x60 [ 20.234263] [] __fput+0x28c/0x6e0 [ 20.239338] [] ____fput+0x15/0x20 [ 20.244416] [] task_work_run+0x115/0x190 [ 20.250114] [] do_exit+0x7e7/0x2a40 [ 20.255368] [] ? selinux_file_ioctl+0x355/0x530 [ 20.261657] [] ? release_task+0x1240/0x1240 [ 20.267608] [] ? SyS_epoll_create+0x190/0x190 [ 20.273721] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.280377] [] do_group_exit+0x108/0x320 [ 20.286086] [] SyS_exit_group+0x1d/0x20 [ 20.291769] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.298317] [ 20.299920] Allocated by task 3322: [ 20.303520] save_stack_trace+0x16/0x20 [ 20.307513] save_stack+0x43/0xd0 [ 20.310955] kasan_kmalloc+0xad/0xe0 [ 20.314635] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.319183] binder_get_thread+0x15d/0x750 [ 20.323384] binder_poll+0x4a/0x210 [ 20.326994] SyS_epoll_ctl+0x11d7/0x2190 [ 20.331029] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.335748] [ 20.337342] Freed by task 3322: [ 20.340595] save_stack_trace+0x16/0x20 [ 20.344569] save_stack+0x43/0xd0 [ 20.348002] kasan_slab_free+0x72/0xc0 [ 20.351891] kfree+0x103/0x300 [ 20.355053] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.359868] binder_thread_release+0x27d/0x540 [ 20.364426] binder_ioctl+0x9c0/0x11b0 [ 20.368288] do_vfs_ioctl+0x1aa/0x1140 [ 20.372152] SyS_ioctl+0x8f/0xc0 [ 20.375503] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.380226] [ 20.381831] The buggy address belongs to the object at ffff8801cd295400 [ 20.381831] which belongs to the cache kmalloc-512 of size 512 [ 20.394470] The buggy address is located 184 bytes inside of [ 20.394470] 512-byte region [ffff8801cd295400, ffff8801cd295600) [ 20.406330] The buggy address belongs to the page: [ 20.411227] page:ffffea000734a500 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.421397] flags: 0x8000000000004080(slab|head) [ 20.426117] page dumped because: kasan: bad access detected [ 20.431797] [ 20.433410] Memory state around the buggy address: [ 20.438306] ffff8801cd295380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.445637] ffff8801cd295400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.452963] >ffff8801cd295480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.460294] ^ [ 20.465468] ffff8801cd295500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.472800] ffff8801cd295580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.480122] ================================================================== [ 20.488292] Disabling lock debugging due to kernel taint [ 20.493714] Kernel panic - not syncing: panic_on_warn set ... [ 20.493714] [ 20.501042] CPU: 1 PID: 3322 Comm: syzkaller993099 Tainted: G B 4.9.72-gcb7518e #114 [ 20.510030] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.519369] ffff8801c887f838 ffffffff81d922b9 ffffffff841955bf ffff8801c887f910 [ 20.527328] 0000000000000000 ffff8801cd2954b8 ffff8801cd2954b8 ffff8801c887f900 [ 20.535290] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 20.543252] Call Trace: [ 20.545813] [] dump_stack+0xc1/0x128 [ 20.551334] [] panic+0x1bc/0x3a8 [ 20.556338] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.564542] [] ? add_taint+0x40/0x50 [ 20.569875] [] kasan_end_report+0x50/0x50 [ 20.575748] [] kasan_report+0x167/0x360 [ 20.581353] [] ? __lock_acquire+0x2eff/0x3640 [ 20.587466] [] __asan_report_load8_noabort+0x14/0x20 [ 20.594198] [] __lock_acquire+0x2eff/0x3640 [ 20.600158] [] ? __lock_acquire+0x629/0x3640 [ 20.606194] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.613197] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.620182] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.627166] [] ? mark_held_locks+0xaf/0x100 [ 20.633112] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.639322] [] lock_acquire+0x12e/0x410 [ 20.644917] [] ? remove_wait_queue+0x14/0x40 [ 20.650956] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.657261] [] ? remove_wait_queue+0x14/0x40 [ 20.663291] [] remove_wait_queue+0x14/0x40 [ 20.669148] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.676147] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.683416] [] ? ep_free+0x1b0/0x1b0 [ 20.688770] [] ep_free+0x96/0x1b0 [ 20.693865] [] ? ep_free+0x1b0/0x1b0 [ 20.699222] [] ep_eventpoll_release+0x44/0x60 [ 20.705353] [] __fput+0x28c/0x6e0 [ 20.710429] [] ____fput+0x15/0x20 [ 20.715522] [] task_work_run+0x115/0x190 [ 20.721206] [] do_exit+0x7e7/0x2a40 [ 20.726458] [] ? selinux_file_ioctl+0x355/0x530 [ 20.732756] [] ? release_task+0x1240/0x1240 [ 20.738696] [] ? SyS_epoll_create+0x190/0x190 [ 20.744824] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.751480] [] do_group_exit+0x108/0x320 [ 20.757185] [] SyS_exit_group+0x1d/0x20 [ 20.762789] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.769815] Dumping ftrace buffer: [ 20.773345] (ftrace buffer empty) [ 20.777031] Kernel Offset: disabled [ 20.780624] Rebooting in 86400 seconds..