[....] Starting enhanced syslogd: rsyslogd[ 13.664424] audit: type=1400 audit(1516664987.027: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.34' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.380659] ================================================================== [ 26.388046] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.394684] Read of size 8 at addr ffff8801c9904338 by task syzkaller931263/3328 [ 26.402185] [ 26.403785] CPU: 0 PID: 3328 Comm: syzkaller931263 Not tainted 4.9.77-ge12a9c4 #18 [ 26.411459] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.420812] ffff8801ce5578e0 ffffffff81d941c9 ffffea0007264100 ffff8801c9904338 [ 26.428780] 0000000000000000 ffff8801c9904338 ffff8801c9904338 ffff8801ce557918 [ 26.436736] ffffffff8153db93 ffff8801c9904338 0000000000000008 0000000000000000 [ 26.444714] Call Trace: [ 26.447277] [] dump_stack+0xc1/0x128 [ 26.452614] [] print_address_description+0x73/0x280 [ 26.459252] [] kasan_report+0x275/0x360 [ 26.464848] [] ? __lock_acquire+0x2eff/0x3640 [ 26.470965] [] __asan_report_load8_noabort+0x14/0x20 [ 26.477689] [] __lock_acquire+0x2eff/0x3640 [ 26.483631] [] ? __lock_acquire+0x629/0x3640 [ 26.489677] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.496664] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.503649] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.510645] [] ? mark_held_locks+0xaf/0x100 [ 26.516601] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.522807] [] lock_acquire+0x12e/0x410 [ 26.528400] [] ? remove_wait_queue+0x14/0x40 [ 26.534428] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.540721] [] ? remove_wait_queue+0x14/0x40 [ 26.546769] [] remove_wait_queue+0x14/0x40 [ 26.552628] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.559619] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.566861] [] ? ep_free+0x1b0/0x1b0 [ 26.572192] [] ep_free+0x96/0x1b0 [ 26.577286] [] ? ep_free+0x1b0/0x1b0 [ 26.582650] [] ep_eventpoll_release+0x44/0x60 [ 26.588781] [] __fput+0x28c/0x6e0 [ 26.593857] [] ____fput+0x15/0x20 [ 26.598940] [] task_work_run+0x115/0x190 [ 26.604620] [] do_exit+0x7e7/0x2a40 [ 26.609865] [] ? selinux_file_ioctl+0x355/0x530 [ 26.616154] [] ? release_task+0x1240/0x1240 [ 26.622096] [] ? SyS_epoll_create+0x190/0x190 [ 26.628214] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 26.634847] [] do_group_exit+0x108/0x320 [ 26.640526] [] SyS_exit_group+0x1d/0x20 [ 26.646116] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 26.652663] [ 26.654261] Allocated by task 3328: [ 26.657856] save_stack_trace+0x16/0x20 [ 26.661798] save_stack+0x43/0xd0 [ 26.665218] kasan_kmalloc+0xad/0xe0 [ 26.668901] kmem_cache_alloc_trace+0xfb/0x2a0 [ 26.673450] binder_get_thread+0x15d/0x750 [ 26.677662] binder_poll+0x4a/0x210 [ 26.681263] SyS_epoll_ctl+0x11d7/0x2190 [ 26.685301] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 26.690029] [ 26.691625] Freed by task 3328: [ 26.694869] save_stack_trace+0x16/0x20 [ 26.698813] save_stack+0x43/0xd0 [ 26.702234] kasan_slab_free+0x72/0xc0 [ 26.706097] kfree+0x103/0x300 [ 26.709259] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.714069] binder_thread_release+0x27d/0x540 [ 26.718619] binder_ioctl+0x9c0/0x11b0 [ 26.722474] do_vfs_ioctl+0x1aa/0x1140 [ 26.726337] SyS_ioctl+0x8f/0xc0 [ 26.729684] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 26.734402] [ 26.735997] The buggy address belongs to the object at ffff8801c9904280 [ 26.735997] which belongs to the cache kmalloc-512 of size 512 [ 26.748623] The buggy address is located 184 bytes inside of [ 26.748623] 512-byte region [ffff8801c9904280, ffff8801c9904480) [ 26.760464] The buggy address belongs to the page: [ 26.765362] page:ffffea0007264100 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.775531] flags: 0x8000000000004080(slab|head) [ 26.780252] page dumped because: kasan: bad access detected [ 26.785932] [ 26.787531] Memory state around the buggy address: [ 26.792430] ffff8801c9904200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.799760] ffff8801c9904280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.807847] >ffff8801c9904300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.815177] ^ [ 26.820338] ffff8801c9904380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.828555] ffff8801c9904400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.835879] ================================================================== [ 26.843207] Disabling lock debugging due to kernel taint [ 26.848625] Kernel panic - not syncing: panic_on_warn set ... [ 26.848625] [ 26.855958] CPU: 0 PID: 3328 Comm: syzkaller931263 Tainted: G B 4.9.77-ge12a9c4 #18 [ 26.864846] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.874168] ffff8801ce557838 ffffffff81d941c9 ffffffff841970ff ffff8801ce557910 [ 26.882147] 0000000000000000 ffff8801c9904338 ffff8801c9904338 ffff8801ce557900 [ 26.890122] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 26.898106] Call Trace: [ 26.900760] [] dump_stack+0xc1/0x128 [ 26.906092] [] panic+0x1bc/0x3a8 [ 26.911250] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.919449] [] ? add_taint+0x40/0x50 [ 26.924785] [] kasan_end_report+0x50/0x50 [ 26.930552] [] kasan_report+0x167/0x360 [ 26.936145] [] ? __lock_acquire+0x2eff/0x3640 [ 26.942261] [] __asan_report_load8_noabort+0x14/0x20 [ 26.948991] [] __lock_acquire+0x2eff/0x3640 [ 26.954943] [] ? __lock_acquire+0x629/0x3640 [ 26.960982] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.967965] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.974946] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.982886] [] ? mark_held_locks+0xaf/0x100 [ 26.988833] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.995046] [] lock_acquire+0x12e/0x410 [ 27.000645] [] ? remove_wait_queue+0x14/0x40 [ 27.006676] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.012969] [] ? remove_wait_queue+0x14/0x40 [ 27.019011] [] remove_wait_queue+0x14/0x40 [ 27.024872] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.031857] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.039105] [] ? ep_free+0x1b0/0x1b0 [ 27.044444] [] ep_free+0x96/0x1b0 [ 27.049519] [] ? ep_free+0x1b0/0x1b0 [ 27.054864] [] ep_eventpoll_release+0x44/0x60 [ 27.060991] [] __fput+0x28c/0x6e0 [ 27.066076] [] ____fput+0x15/0x20 [ 27.071156] [] task_work_run+0x115/0x190 [ 27.076844] [] do_exit+0x7e7/0x2a40 [ 27.082098] [] ? selinux_file_ioctl+0x355/0x530 [ 27.088390] [] ? release_task+0x1240/0x1240 [ 27.094332] [] ? SyS_epoll_create+0x190/0x190 [ 27.100449] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 27.107098] [] do_group_exit+0x108/0x320 [ 27.112793] [] SyS_exit_group+0x1d/0x20 [ 27.118392] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 27.125334] Dumping ftrace buffer: [ 27.128845] (ftrace buffer empty) [ 27.132528] Kernel Offset: disabled [ 27.136123] Rebooting in 86400 seconds..