[....] Starting enhanced syslogd: rsyslogd[ 10.785458] audit: type=1400 audit(1515135251.155:4): avc: denied { syslog } for pid=3176 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.15.210' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.756690] ================================================================== [ 19.757780] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.758687] Read of size 8 at addr ffff8801c84a8838 by task syzkaller244889/3326 [ 19.759684] [ 19.759915] CPU: 0 PID: 3326 Comm: syzkaller244889 Not tainted 4.9.74-g173c52e #4 [ 19.760908] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.762141] ffff8801d4dcf8e0 ffffffff81d91b09 ffffea0007212a00 ffff8801c84a8838 [ 19.763366] 0000000000000000 ffff8801c84a8838 ffff8801c84a8838 ffff8801d4dcf918 [ 19.764503] ffffffff8153b503 ffff8801c84a8838 0000000000000008 0000000000000000 [ 19.765632] Call Trace: [ 19.765989] [] dump_stack+0xc1/0x128 [ 19.766701] [] print_address_description+0x73/0x280 [ 19.767576] [] kasan_report+0x275/0x360 [ 19.768316] [] ? __lock_acquire+0x2eff/0x3640 [ 19.769160] [] __asan_report_load8_noabort+0x14/0x20 [ 19.770057] [] __lock_acquire+0x2eff/0x3640 [ 19.770859] [] ? __lock_acquire+0x629/0x3640 [ 19.771655] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.772588] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.773506] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.774426] [] ? mark_held_locks+0xaf/0x100 [ 19.775226] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.776055] [] lock_acquire+0x12e/0x410 [ 19.776796] [] ? remove_wait_queue+0x14/0x40 [ 19.782815] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.789102] [] ? remove_wait_queue+0x14/0x40 [ 19.795121] [] remove_wait_queue+0x14/0x40 [ 19.800968] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.807942] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.815177] [] ? ep_free+0x1b0/0x1b0 [ 19.820502] [] ep_free+0x96/0x1b0 [ 19.825608] [] ? ep_free+0x1b0/0x1b0 [ 19.830934] [] ep_eventpoll_release+0x44/0x60 [ 19.837045] [] __fput+0x28c/0x6e0 [ 19.842112] [] ____fput+0x15/0x20 [ 19.847177] [] task_work_run+0x115/0x190 [ 19.852851] [] do_exit+0x7e7/0x2a40 [ 19.858093] [] ? selinux_file_ioctl+0x355/0x530 [ 19.864372] [] ? release_task+0x1240/0x1240 [ 19.870307] [] ? SyS_epoll_create+0x190/0x190 [ 19.876422] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 19.883056] [] do_group_exit+0x108/0x320 [ 19.888729] [] SyS_exit_group+0x1d/0x20 [ 19.894321] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.900857] [ 19.902447] Allocated by task 3326: [ 19.906038] save_stack_trace+0x16/0x20 [ 19.909975] save_stack+0x43/0xd0 [ 19.913388] kasan_kmalloc+0xad/0xe0 [ 19.917062] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.921606] binder_get_thread+0x15d/0x750 [ 19.925804] binder_poll+0x4a/0x210 [ 19.929396] SyS_epoll_ctl+0x11d7/0x2190 [ 19.933419] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.938134] [ 19.939724] Freed by task 3326: [ 19.942962] save_stack_trace+0x16/0x20 [ 19.946899] save_stack+0x43/0xd0 [ 19.950318] kasan_slab_free+0x72/0xc0 [ 19.954167] kfree+0x103/0x300 [ 19.957324] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.962128] binder_thread_release+0x27d/0x540 [ 19.966673] binder_ioctl+0x9c0/0x11b0 [ 19.970522] do_vfs_ioctl+0x1aa/0x1140 [ 19.974372] SyS_ioctl+0x8f/0xc0 [ 19.977701] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 19.982417] [ 19.984014] The buggy address belongs to the object at ffff8801c84a8780 [ 19.984014] which belongs to the cache kmalloc-512 of size 512 [ 19.996631] The buggy address is located 184 bytes inside of [ 19.996631] 512-byte region [ffff8801c84a8780, ffff8801c84a8980) [ 20.008466] The buggy address belongs to the page: [ 20.013358] page:ffffea0007212a00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.023510] flags: 0x8000000000004080(slab|head) [ 20.028228] page dumped because: kasan: bad access detected [ 20.033896] [ 20.035488] Memory state around the buggy address: [ 20.040379] ffff8801c84a8700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.047703] ffff8801c84a8780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.055026] >ffff8801c84a8800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.062349] ^ [ 20.067499] ffff8801c84a8880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.074818] ffff8801c84a8900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.082143] ================================================================== [ 20.089463] Disabling lock debugging due to kernel taint [ 20.094871] Kernel panic - not syncing: panic_on_warn set ... [ 20.094871] [ 20.102201] CPU: 0 PID: 3326 Comm: syzkaller244889 Tainted: G B 4.9.74-g173c52e #4 [ 20.111007] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.120330] ffff8801d4dcf838 ffffffff81d91b09 ffffffff841955df ffff8801d4dcf910 [ 20.128279] 0000000000000000 ffff8801c84a8838 ffff8801c84a8838 ffff8801d4dcf900 [ 20.136223] ffffffff8142d161 0000000041b58ab3 ffffffff84189020 ffffffff8142cfa5 [ 20.144161] Call Trace: [ 20.146713] [] dump_stack+0xc1/0x128 [ 20.152041] [] panic+0x1bc/0x3a8 [ 20.157020] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.165213] [] ? add_taint+0x40/0x50 [ 20.170539] [] kasan_end_report+0x50/0x50 [ 20.176300] [] kasan_report+0x167/0x360 [ 20.181887] [] ? __lock_acquire+0x2eff/0x3640 [ 20.187995] [] __asan_report_load8_noabort+0x14/0x20 [ 20.194716] [] __lock_acquire+0x2eff/0x3640 [ 20.200648] [] ? __lock_acquire+0x629/0x3640 [ 20.206674] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.213650] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.220627] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.227605] [] ? mark_held_locks+0xaf/0x100 [ 20.233541] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.239736] [] lock_acquire+0x12e/0x410 [ 20.245323] [] ? remove_wait_queue+0x14/0x40 [ 20.251344] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.257626] [] ? remove_wait_queue+0x14/0x40 [ 20.263646] [] remove_wait_queue+0x14/0x40 [ 20.269493] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.276903] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.284142] [] ? ep_free+0x1b0/0x1b0 [ 20.289470] [] ep_free+0x96/0x1b0 [ 20.294533] [] ? ep_free+0x1b0/0x1b0 [ 20.299860] [] ep_eventpoll_release+0x44/0x60 [ 20.305970] [] __fput+0x28c/0x6e0 [ 20.311034] [] ____fput+0x15/0x20 [ 20.316100] [] task_work_run+0x115/0x190 [ 20.321777] [] do_exit+0x7e7/0x2a40 [ 20.327018] [] ? selinux_file_ioctl+0x355/0x530 [ 20.333299] [] ? release_task+0x1240/0x1240 [ 20.339233] [] ? SyS_epoll_create+0x190/0x190 [ 20.345339] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.351969] [] do_group_exit+0x108/0x320 [ 20.357641] [] SyS_exit_group+0x1d/0x20 [ 20.363226] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.369807] Dumping ftrace buffer: [ 20.373314] (ftrace buffer empty) [ 20.376989] Kernel Offset: disabled [ 20.380579] Rebooting in 86400 seconds..