[....] Starting enhanced syslogd: rsyslogd[ 10.555304] audit: type=1400 audit(1516075631.668:4): avc: denied { syslog } for pid=3183 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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.60' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.677740] ================================================================== [ 27.679009] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.679895] Read of size 8 at addr ffff8801cbe33738 by task syzkaller253489/3340 [ 27.680914] [ 27.681150] CPU: 1 PID: 3340 Comm: syzkaller253489 Not tainted 4.9.76-g8dec074 #13 [ 27.682200] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.683515] ffff8801c94078e0 ffffffff81d93169 ffffea00072f8c80 ffff8801cbe33738 [ 27.684799] 0000000000000000 ffff8801cbe33738 ffff8801cbe33738 ffff8801c9407918 [ 27.686194] ffffffff8153cb43 ffff8801cbe33738 0000000000000008 0000000000000000 [ 27.687446] Call Trace: [ 27.687852] [] dump_stack+0xc1/0x128 [ 27.688658] [] print_address_description+0x73/0x280 [ 27.689598] [] kasan_report+0x275/0x360 [ 27.690366] [] ? __lock_acquire+0x2eff/0x3640 [ 27.691253] [] __asan_report_load8_noabort+0x14/0x20 [ 27.692146] [] __lock_acquire+0x2eff/0x3640 [ 27.692955] [] ? __lock_acquire+0x629/0x3640 [ 27.693955] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.694929] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.695874] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.696805] [] ? mark_held_locks+0xaf/0x100 [ 27.697677] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.702744] [] lock_acquire+0x12e/0x410 [ 27.708349] [] ? remove_wait_queue+0x14/0x40 [ 27.714379] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.721336] [] ? remove_wait_queue+0x14/0x40 [ 27.727383] [] remove_wait_queue+0x14/0x40 [ 27.733253] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.740245] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.747512] [] ? ep_free+0x1b0/0x1b0 [ 27.752871] [] ep_free+0x96/0x1b0 [ 27.757958] [] ? ep_free+0x1b0/0x1b0 [ 27.763294] [] ep_eventpoll_release+0x44/0x60 [ 27.769413] [] __fput+0x28c/0x6e0 [ 27.774489] [] ____fput+0x15/0x20 [ 27.779566] [] task_work_run+0x115/0x190 [ 27.785250] [] do_exit+0x7e7/0x2a40 [ 27.790501] [] ? selinux_file_ioctl+0x355/0x530 [ 27.796803] [] ? release_task+0x1240/0x1240 [ 27.802745] [] ? SyS_epoll_create+0x190/0x190 [ 27.808865] [] ? fd_install+0x4d/0x60 [ 27.814285] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 27.820924] [] do_group_exit+0x108/0x320 [ 27.826606] [] SyS_exit_group+0x1d/0x20 [ 27.832201] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 27.838760] [ 27.840358] Allocated by task 3340: [ 27.843968] save_stack_trace+0x16/0x20 [ 27.847917] save_stack+0x43/0xd0 [ 27.851338] kasan_kmalloc+0xad/0xe0 [ 27.855035] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.859590] binder_get_thread+0x15d/0x750 [ 27.863805] binder_poll+0x4a/0x210 [ 27.867404] SyS_epoll_ctl+0x11d7/0x2190 [ 27.871432] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 27.876155] [ 27.877754] Freed by task 3340: [ 27.881014] save_stack_trace+0x16/0x20 [ 27.884958] save_stack+0x43/0xd0 [ 27.888383] kasan_slab_free+0x72/0xc0 [ 27.892250] kfree+0x103/0x300 [ 27.895413] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.900226] binder_thread_release+0x27d/0x540 [ 27.904779] binder_ioctl+0x9c0/0x11b0 [ 27.908648] do_vfs_ioctl+0x1aa/0x1140 [ 27.912506] SyS_ioctl+0x8f/0xc0 [ 27.915843] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 27.920567] [ 27.922166] The buggy address belongs to the object at ffff8801cbe33680 [ 27.922166] which belongs to the cache kmalloc-512 of size 512 [ 27.934789] The buggy address is located 184 bytes inside of [ 27.934789] 512-byte region [ffff8801cbe33680, ffff8801cbe33880) [ 27.946630] The buggy address belongs to the page: [ 27.951543] page:ffffea00072f8c80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.961715] flags: 0x8000000000004080(slab|head) [ 27.966440] page dumped because: kasan: bad access detected [ 27.972121] [ 27.973717] Memory state around the buggy address: [ 27.978616] ffff8801cbe33600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.985948] ffff8801cbe33680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.993277] >ffff8801cbe33700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.000605] ^ [ 28.005788] ffff8801cbe33780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.013124] ffff8801cbe33800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.020457] ================================================================== [ 28.027792] Disabling lock debugging due to kernel taint [ 28.033213] Kernel panic - not syncing: panic_on_warn set ... [ 28.033213] [ 28.040550] CPU: 1 PID: 3340 Comm: syzkaller253489 Tainted: G B 4.9.76-g8dec074 #13 [ 28.049447] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.058792] ffff8801c9407838 ffffffff81d93169 ffffffff84195c2f ffff8801c9407910 [ 28.066769] 0000000000000000 ffff8801cbe33738 ffff8801cbe33738 ffff8801c9407900 [ 28.074745] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 28.082712] Call Trace: [ 28.085273] [] dump_stack+0xc1/0x128 [ 28.090621] [] panic+0x1bc/0x3a8 [ 28.095612] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 28.103815] [] ? add_taint+0x40/0x50 [ 28.109153] [] kasan_end_report+0x50/0x50 [ 28.114923] [] kasan_report+0x167/0x360 [ 28.120522] [] ? __lock_acquire+0x2eff/0x3640 [ 28.126638] [] __asan_report_load8_noabort+0x14/0x20 [ 28.133377] [] __lock_acquire+0x2eff/0x3640 [ 28.139320] [] ? __lock_acquire+0x629/0x3640 [ 28.145351] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.152349] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.159335] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.166331] [] ? mark_held_locks+0xaf/0x100 [ 28.172274] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.178476] [] lock_acquire+0x12e/0x410 [ 28.184070] [] ? remove_wait_queue+0x14/0x40 [ 28.190098] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.196386] [] ? remove_wait_queue+0x14/0x40 [ 28.202414] [] remove_wait_queue+0x14/0x40 [ 28.208269] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.215267] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.222524] [] ? ep_free+0x1b0/0x1b0 [ 28.227947] [] ep_free+0x96/0x1b0 [ 28.233017] [] ? ep_free+0x1b0/0x1b0 [ 28.238352] [] ep_eventpoll_release+0x44/0x60 [ 28.244466] [] __fput+0x28c/0x6e0 [ 28.249539] [] ____fput+0x15/0x20 [ 28.254614] [] task_work_run+0x115/0x190 [ 28.260296] [] do_exit+0x7e7/0x2a40 [ 28.265550] [] ? selinux_file_ioctl+0x355/0x530 [ 28.271852] [] ? release_task+0x1240/0x1240 [ 28.277801] [] ? SyS_epoll_create+0x190/0x190 [ 28.283916] [] ? fd_install+0x4d/0x60 [ 28.289335] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 28.295974] [] do_group_exit+0x108/0x320 [ 28.301653] [] SyS_exit_group+0x1d/0x20 [ 28.307249] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 28.314187] Dumping ftrace buffer: [ 28.317698] (ftrace buffer empty) [ 28.321379] Kernel Offset: disabled [ 28.324975] Rebooting in 86400 seconds..