[....] Starting enhanced syslogd: rsyslogd[ 11.331246] audit: type=1400 audit(1516147106.553:4): avc: denied { syslog } for pid=3181 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.44' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.256349] ================================================================== [ 19.257433] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.258321] Read of size 8 at addr ffff8801c8904d38 by task syzkaller495540/3329 [ 19.259303] [ 19.259532] CPU: 1 PID: 3329 Comm: syzkaller495540 Not tainted 4.9.76-g8dec074 #13 [ 19.260538] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.261753] ffff8801c8b878e0 ffffffff81d93169 ffffea0007224100 ffff8801c8904d38 [ 19.262949] 0000000000000000 ffff8801c8904d38 ffff8801c8904d38 ffff8801c8b87918 [ 19.264092] ffffffff8153cb43 ffff8801c8904d38 0000000000000008 0000000000000000 [ 19.265288] Call Trace: [ 19.265644] [] dump_stack+0xc1/0x128 [ 19.266354] [] print_address_description+0x73/0x280 [ 19.267246] [] kasan_report+0x275/0x360 [ 19.267986] [] ? __lock_acquire+0x2eff/0x3640 [ 19.268796] [] __asan_report_load8_noabort+0x14/0x20 [ 19.269692] [] __lock_acquire+0x2eff/0x3640 [ 19.270476] [] ? __lock_acquire+0x629/0x3640 [ 19.271275] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.272194] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.273112] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.274031] [] ? mark_held_locks+0xaf/0x100 [ 19.274819] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.275677] [] lock_acquire+0x12e/0x410 [ 19.276419] [] ? remove_wait_queue+0x14/0x40 [ 19.277214] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.283494] [] ? remove_wait_queue+0x14/0x40 [ 19.289513] [] remove_wait_queue+0x14/0x40 [ 19.295364] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.302347] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.309589] [] ? ep_free+0x1b0/0x1b0 [ 19.314916] [] ep_free+0x96/0x1b0 [ 19.319981] [] ? ep_free+0x1b0/0x1b0 [ 19.325308] [] ep_eventpoll_release+0x44/0x60 [ 19.331422] [] __fput+0x28c/0x6e0 [ 19.336489] [] ____fput+0x15/0x20 [ 19.341555] [] task_work_run+0x115/0x190 [ 19.347231] [] do_exit+0x7e7/0x2a40 [ 19.352473] [] ? selinux_file_ioctl+0x355/0x530 [ 19.358765] [] ? release_task+0x1240/0x1240 [ 19.364703] [] ? SyS_epoll_create+0x190/0x190 [ 19.370809] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 19.377442] [] do_group_exit+0x108/0x320 [ 19.383117] [] SyS_exit_group+0x1d/0x20 [ 19.388702] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 19.395241] [ 19.396831] Allocated by task 3329: [ 19.400431] save_stack_trace+0x16/0x20 [ 19.404383] save_stack+0x43/0xd0 [ 19.407807] kasan_kmalloc+0xad/0xe0 [ 19.411487] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.416040] binder_get_thread+0x15d/0x750 [ 19.420243] binder_poll+0x4a/0x210 [ 19.423833] SyS_epoll_ctl+0x11d7/0x2190 [ 19.427859] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 19.432575] [ 19.434166] Freed by task 3329: [ 19.437408] save_stack_trace+0x16/0x20 [ 19.441345] save_stack+0x43/0xd0 [ 19.444764] kasan_slab_free+0x72/0xc0 [ 19.448612] kfree+0x103/0x300 [ 19.451774] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.456578] binder_thread_release+0x27d/0x540 [ 19.461122] binder_ioctl+0x9c0/0x11b0 [ 19.464972] do_vfs_ioctl+0x1aa/0x1140 [ 19.468822] SyS_ioctl+0x8f/0xc0 [ 19.472151] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 19.476864] [ 19.478458] The buggy address belongs to the object at ffff8801c8904c80 [ 19.478458] which belongs to the cache kmalloc-512 of size 512 [ 19.491079] The buggy address is located 184 bytes inside of [ 19.491079] 512-byte region [ffff8801c8904c80, ffff8801c8904e80) [ 19.503001] The buggy address belongs to the page: [ 19.507894] page:ffffea0007224100 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.518047] flags: 0x8000000000004080(slab|head) [ 19.522761] page dumped because: kasan: bad access detected [ 19.528430] [ 19.530019] Memory state around the buggy address: [ 19.534913] ffff8801c8904c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.542250] ffff8801c8904c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.549589] >ffff8801c8904d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.556925] ^ [ 19.562077] ffff8801c8904d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.569404] ffff8801c8904e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.576730] ================================================================== [ 19.584060] Disabling lock debugging due to kernel taint [ 19.589472] Kernel panic - not syncing: panic_on_warn set ... [ 19.589472] [ 19.596799] CPU: 1 PID: 3329 Comm: syzkaller495540 Tainted: G B 4.9.76-g8dec074 #13 [ 19.605684] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.615005] ffff8801c8b87838 ffffffff81d93169 ffffffff84195c2f ffff8801c8b87910 [ 19.622945] 0000000000000000 ffff8801c8904d38 ffff8801c8904d38 ffff8801c8b87900 [ 19.630894] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 19.638848] Call Trace: [ 19.641403] [] dump_stack+0xc1/0x128 [ 19.646732] [] panic+0x1bc/0x3a8 [ 19.651712] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.659910] [] ? add_taint+0x40/0x50 [ 19.665249] [] kasan_end_report+0x50/0x50 [ 19.671024] [] kasan_report+0x167/0x360 [ 19.676622] [] ? __lock_acquire+0x2eff/0x3640 [ 19.682741] [] __asan_report_load8_noabort+0x14/0x20 [ 19.689458] [] __lock_acquire+0x2eff/0x3640 [ 19.695392] [] ? __lock_acquire+0x629/0x3640 [ 19.701423] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.708403] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.715379] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.722355] [] ? mark_held_locks+0xaf/0x100 [ 19.728291] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.734485] [] lock_acquire+0x12e/0x410 [ 19.740070] [] ? remove_wait_queue+0x14/0x40 [ 19.746090] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.752370] [] ? remove_wait_queue+0x14/0x40 [ 19.758391] [] remove_wait_queue+0x14/0x40 [ 19.764239] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.771213] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.778449] [] ? ep_free+0x1b0/0x1b0 [ 19.783777] [] ep_free+0x96/0x1b0 [ 19.788843] [] ? ep_free+0x1b0/0x1b0 [ 19.794169] [] ep_eventpoll_release+0x44/0x60 [ 19.800278] [] __fput+0x28c/0x6e0 [ 19.805345] [] ____fput+0x15/0x20 [ 19.810410] [] task_work_run+0x115/0x190 [ 19.816090] [] do_exit+0x7e7/0x2a40 [ 19.821335] [] ? selinux_file_ioctl+0x355/0x530 [ 19.827619] [] ? release_task+0x1240/0x1240 [ 19.833555] [] ? SyS_epoll_create+0x190/0x190 [ 19.839665] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 19.846304] [] do_group_exit+0x108/0x320 [ 19.851978] [] SyS_exit_group+0x1d/0x20 [ 19.857564] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 19.864647] Dumping ftrace buffer: [ 19.868154] (ftrace buffer empty) [ 19.871830] Kernel Offset: disabled [ 19.875424] Rebooting in 86400 seconds..