[....] Starting enhanced syslogd: rsyslogd[ 13.549919] audit: type=1400 audit(1514658254.009:4): avc: denied { syslog } for pid=3168 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.9' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 30.399163] ================================================================== [ 30.406553] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 30.413188] Read of size 8 at addr ffff8801cd376338 by task syzkaller338674/3325 [ 30.420686] [ 30.422284] CPU: 0 PID: 3325 Comm: syzkaller338674 Not tainted 4.9.73-gf3f3457 #1 [ 30.429868] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.439199] ffff8801c8cf78e0 ffffffff81d922b9 ffffea000734dd80 ffff8801cd376338 [ 30.447154] 0000000000000000 ffff8801cd376338 ffff8801cd376338 ffff8801c8cf7918 [ 30.455109] ffffffff8153bab3 ffff8801cd376338 0000000000000008 0000000000000000 [ 30.463099] Call Trace: [ 30.465655] [] dump_stack+0xc1/0x128 [ 30.470998] [] print_address_description+0x73/0x280 [ 30.477630] [] kasan_report+0x275/0x360 [ 30.483225] [] ? __lock_acquire+0x2eff/0x3640 [ 30.489338] [] __asan_report_load8_noabort+0x14/0x20 [ 30.496067] [] __lock_acquire+0x2eff/0x3640 [ 30.502093] [] ? __lock_acquire+0x629/0x3640 [ 30.508117] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 30.515105] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 30.522088] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 30.529069] [] ? mark_held_locks+0xaf/0x100 [ 30.535008] [] ? mutex_lock_nested+0x5e3/0x870 [ 30.541207] [] lock_acquire+0x12e/0x410 [ 30.546806] [] ? remove_wait_queue+0x14/0x40 [ 30.552834] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 30.559119] [] ? remove_wait_queue+0x14/0x40 [ 30.565149] [] remove_wait_queue+0x14/0x40 [ 30.571008] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 30.577988] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 30.585229] [] ? ep_free+0x1b0/0x1b0 [ 30.590558] [] ep_free+0x96/0x1b0 [ 30.595637] [] ? ep_free+0x1b0/0x1b0 [ 30.600965] [] ep_eventpoll_release+0x44/0x60 [ 30.607079] [] __fput+0x28c/0x6e0 [ 30.612152] [] ____fput+0x15/0x20 [ 30.617223] [] task_work_run+0x115/0x190 [ 30.622911] [] do_exit+0x7e7/0x2a40 [ 30.628158] [] ? selinux_file_ioctl+0x355/0x530 [ 30.634453] [] ? release_task+0x1240/0x1240 [ 30.640392] [] ? SyS_epoll_create+0x190/0x190 [ 30.646505] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 30.653138] [] do_group_exit+0x108/0x320 [ 30.658829] [] SyS_exit_group+0x1d/0x20 [ 30.664428] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 30.670971] [ 30.672567] Allocated by task 3325: [ 30.676160] save_stack_trace+0x16/0x20 [ 30.680101] save_stack+0x43/0xd0 [ 30.683521] kasan_kmalloc+0xad/0xe0 [ 30.687201] kmem_cache_alloc_trace+0xfb/0x2a0 [ 30.691752] binder_get_thread+0x15d/0x750 [ 30.695953] binder_poll+0x4a/0x210 [ 30.699542] SyS_epoll_ctl+0x11d7/0x2190 [ 30.703568] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 30.708285] [ 30.709878] Freed by task 3325: [ 30.713125] save_stack_trace+0x16/0x20 [ 30.717064] save_stack+0x43/0xd0 [ 30.720482] kasan_slab_free+0x72/0xc0 [ 30.724334] kfree+0x103/0x300 [ 30.727492] binder_thread_dec_tmpref+0x1cc/0x240 [ 30.732302] binder_thread_release+0x27d/0x540 [ 30.736847] binder_ioctl+0x9c0/0x11b0 [ 30.740701] do_vfs_ioctl+0x1aa/0x1140 [ 30.744555] SyS_ioctl+0x8f/0xc0 [ 30.747886] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 30.752603] [ 30.754197] The buggy address belongs to the object at ffff8801cd376280 [ 30.754197] which belongs to the cache kmalloc-512 of size 512 [ 30.766826] The buggy address is located 184 bytes inside of [ 30.766826] 512-byte region [ffff8801cd376280, ffff8801cd376480) [ 30.778677] The buggy address belongs to the page: [ 30.783581] page:ffffea000734dd80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 30.793757] flags: 0x8000000000004080(slab|head) [ 30.798484] page dumped because: kasan: bad access detected [ 30.804159] [ 30.805753] Memory state around the buggy address: [ 30.810650] ffff8801cd376200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.817978] ffff8801cd376280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.825304] >ffff8801cd376300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.832629] ^ [ 30.837787] ffff8801cd376380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.845125] ffff8801cd376400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.852449] ================================================================== [ 30.859773] Disabling lock debugging due to kernel taint [ 30.865187] Kernel panic - not syncing: panic_on_warn set ... [ 30.865187] [ 30.872517] CPU: 0 PID: 3325 Comm: syzkaller338674 Tainted: G B 4.9.73-gf3f3457 #1 [ 30.881327] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.890650] ffff8801c8cf7838 ffffffff81d922b9 ffffffff841955bf ffff8801c8cf7910 [ 30.898621] 0000000000000000 ffff8801cd376338 ffff8801cd376338 ffff8801c8cf7900 [ 30.906577] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 30.914529] Call Trace: [ 30.917098] [] dump_stack+0xc1/0x128 [ 30.922429] [] panic+0x1bc/0x3a8 [ 30.927411] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 30.935623] [] ? add_taint+0x40/0x50 [ 30.940956] [] kasan_end_report+0x50/0x50 [ 30.946733] [] kasan_report+0x167/0x360 [ 30.952333] [] ? __lock_acquire+0x2eff/0x3640 [ 30.958448] [] __asan_report_load8_noabort+0x14/0x20 [ 30.965168] [] __lock_acquire+0x2eff/0x3640 [ 30.971107] [] ? __lock_acquire+0x629/0x3640 [ 30.977145] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 30.984139] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 30.991128] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 30.998118] [] ? mark_held_locks+0xaf/0x100 [ 31.004058] [] ? mutex_lock_nested+0x5e3/0x870 [ 31.010260] [] lock_acquire+0x12e/0x410 [ 31.015861] [] ? remove_wait_queue+0x14/0x40 [ 31.021885] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 31.028172] [] ? remove_wait_queue+0x14/0x40 [ 31.034208] [] remove_wait_queue+0x14/0x40 [ 31.040068] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 31.047059] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 31.054387] [] ? ep_free+0x1b0/0x1b0 [ 31.059717] [] ep_free+0x96/0x1b0 [ 31.064796] [] ? ep_free+0x1b0/0x1b0 [ 31.070127] [] ep_eventpoll_release+0x44/0x60 [ 31.076347] [] __fput+0x28c/0x6e0 [ 31.081419] [] ____fput+0x15/0x20 [ 31.086490] [] task_work_run+0x115/0x190 [ 31.092178] [] do_exit+0x7e7/0x2a40 [ 31.097425] [] ? selinux_file_ioctl+0x355/0x530 [ 31.103711] [] ? release_task+0x1240/0x1240 [ 31.109651] [] ? SyS_epoll_create+0x190/0x190 [ 31.115766] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 31.122402] [] do_group_exit+0x108/0x320 [ 31.128090] [] SyS_exit_group+0x1d/0x20 [ 31.133686] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 31.140269] Dumping ftrace buffer: [ 31.143776] (ftrace buffer empty) [ 31.147455] Kernel Offset: disabled [ 31.151050] Rebooting in 86400 seconds..