[....] Starting enhanced syslogd: rsyslogd[ 15.175092] audit: type=1400 audit(1517869841.485:4): avc: denied { syslog } for pid=3647 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.60' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 50.843564] ================================================================== [ 50.851075] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 50.857746] Read of size 8 at addr ffff8801bbeb6fb8 by task syzkaller896894/3818 [ 50.865244] [ 50.866845] CPU: 1 PID: 3818 Comm: syzkaller896894 Not tainted 4.9.80-gb30d2b5 #28 [ 50.874520] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 50.883847] ffff8801b28bf8e0 ffffffff81d94b69 ffffea0006efad80 ffff8801bbeb6fb8 [ 50.891815] 0000000000000000 ffff8801bbeb6fb8 ffff8801bbeb6fb8 ffff8801b28bf918 [ 50.899784] ffffffff8153e093 ffff8801bbeb6fb8 0000000000000008 0000000000000000 [ 50.907787] Call Trace: [ 50.910348] [] dump_stack+0xc1/0x128 [ 50.915683] [] print_address_description+0x73/0x280 [ 50.922318] [] kasan_report+0x275/0x360 [ 50.927910] [] ? __lock_acquire+0x2eff/0x3640 [ 50.934025] [] __asan_report_load8_noabort+0x14/0x20 [ 50.940746] [] __lock_acquire+0x2eff/0x3640 [ 50.946684] [] ? __lock_acquire+0x629/0x3640 [ 50.952713] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 50.959693] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 50.966679] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 50.973663] [] ? mark_held_locks+0xaf/0x100 [ 50.979603] [] ? mutex_lock_nested+0x5e3/0x870 [ 50.985803] [] lock_acquire+0x12e/0x410 [ 50.991396] [] ? remove_wait_queue+0x14/0x40 [ 50.997418] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 51.003706] [] ? remove_wait_queue+0x14/0x40 [ 51.009733] [] remove_wait_queue+0x14/0x40 [ 51.015586] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 51.022579] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 51.029822] [] ? ep_free+0x1b0/0x1b0 [ 51.035153] [] ep_free+0x96/0x1b0 [ 51.040224] [] ? ep_free+0x1b0/0x1b0 [ 51.045555] [] ep_eventpoll_release+0x44/0x60 [ 51.051682] [] __fput+0x28c/0x6e0 [ 51.056760] [] ____fput+0x15/0x20 [ 51.061834] [] task_work_run+0x115/0x190 [ 51.067517] [] do_exit+0x7e7/0x2a40 [ 51.072763] [] ? selinux_file_ioctl+0x355/0x530 [ 51.079048] [] ? release_task+0x1240/0x1240 [ 51.084989] [] ? SyS_epoll_create+0x190/0x190 [ 51.091103] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 51.097735] [] do_group_exit+0x108/0x320 [ 51.103415] [] SyS_exit_group+0x1d/0x20 [ 51.109006] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 51.115549] [ 51.117145] Allocated by task 3818: [ 51.120744] save_stack_trace+0x16/0x20 [ 51.124687] save_stack+0x43/0xd0 [ 51.128112] kasan_kmalloc+0xad/0xe0 [ 51.131793] kmem_cache_alloc_trace+0xfb/0x2a0 [ 51.136341] binder_get_thread+0x15d/0x750 [ 51.140542] binder_poll+0x4a/0x210 [ 51.144135] SyS_epoll_ctl+0x11d7/0x2190 [ 51.148161] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 51.152881] [ 51.154481] Freed by task 3818: [ 51.157730] save_stack_trace+0x16/0x20 [ 51.161671] save_stack+0x43/0xd0 [ 51.165094] kasan_slab_free+0x72/0xc0 [ 51.168946] kfree+0x103/0x300 [ 51.172108] binder_thread_dec_tmpref+0x1cc/0x240 [ 51.176915] binder_thread_release+0x27d/0x540 [ 51.181463] binder_ioctl+0x9c0/0x11b0 [ 51.185320] do_vfs_ioctl+0x1aa/0x1140 [ 51.189174] SyS_ioctl+0x8f/0xc0 [ 51.192506] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 51.197227] [ 51.198823] The buggy address belongs to the object at ffff8801bbeb6f00 [ 51.198823] which belongs to the cache kmalloc-512 of size 512 [ 51.211444] The buggy address is located 184 bytes inside of [ 51.211444] 512-byte region [ffff8801bbeb6f00, ffff8801bbeb7100) [ 51.223283] The buggy address belongs to the page: [ 51.228178] page:ffffea0006efad80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 51.238341] flags: 0x8000000000004080(slab|head) [ 51.243062] page dumped because: kasan: bad access detected [ 51.248738] [ 51.250333] Memory state around the buggy address: [ 51.255239] ffff8801bbeb6e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 51.262574] ffff8801bbeb6f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.269900] >ffff8801bbeb6f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.277224] ^ [ 51.282379] ffff8801bbeb7000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.289706] ffff8801bbeb7080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.297027] ================================================================== [ 51.304354] Disabling lock debugging due to kernel taint [ 51.309770] Kernel panic - not syncing: panic_on_warn set ... [ 51.309770] [ 51.317100] CPU: 1 PID: 3818 Comm: syzkaller896894 Tainted: G B 4.9.80-gb30d2b5 #28 [ 51.325986] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.335309] ffff8801b28bf838 ffffffff81d94b69 ffffffff841970af ffff8801b28bf910 [ 51.343280] 0000000000000000 ffff8801bbeb6fb8 ffff8801bbeb6fb8 ffff8801b28bf900 [ 51.351252] ffffffff8142f541 0000000041b58ab3 ffffffff8418ab20 ffffffff8142f385 [ 51.359222] Call Trace: [ 51.361778] [] dump_stack+0xc1/0x128 [ 51.367109] [] panic+0x1bc/0x3a8 [ 51.372096] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 51.380296] [] ? add_taint+0x40/0x50 [ 51.385632] [] kasan_end_report+0x50/0x50 [ 51.391403] [] kasan_report+0x167/0x360 [ 51.397000] [] ? __lock_acquire+0x2eff/0x3640 [ 51.403122] [] __asan_report_load8_noabort+0x14/0x20 [ 51.409847] [] __lock_acquire+0x2eff/0x3640 [ 51.415788] [] ? __lock_acquire+0x629/0x3640 [ 51.421816] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 51.428801] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 51.435785] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 51.442766] [] ? mark_held_locks+0xaf/0x100 [ 51.448710] [] ? mutex_lock_nested+0x5e3/0x870 [ 51.454908] [] lock_acquire+0x12e/0x410 [ 51.460499] [] ? remove_wait_queue+0x14/0x40 [ 51.466525] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 51.472810] [] ? remove_wait_queue+0x14/0x40 [ 51.478851] [] remove_wait_queue+0x14/0x40 [ 51.484726] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 51.491722] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 51.498970] [] ? ep_free+0x1b0/0x1b0 [ 51.504305] [] ep_free+0x96/0x1b0 [ 51.509380] [] ? ep_free+0x1b0/0x1b0 [ 51.514717] [] ep_eventpoll_release+0x44/0x60 [ 51.520842] [] __fput+0x28c/0x6e0 [ 51.525921] [] ____fput+0x15/0x20 [ 51.530997] [] task_work_run+0x115/0x190 [ 51.536689] [] do_exit+0x7e7/0x2a40 [ 51.541938] [] ? selinux_file_ioctl+0x355/0x530 [ 51.548225] [] ? release_task+0x1240/0x1240 [ 51.554168] [] ? SyS_epoll_create+0x190/0x190 [ 51.560284] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 51.566921] [] do_group_exit+0x108/0x320 [ 51.572601] [] SyS_exit_group+0x1d/0x20 [ 51.578195] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 51.585101] Dumping ftrace buffer: [ 51.588614] (ftrace buffer empty) [ 51.592295] Kernel Offset: disabled [ 51.595890] Rebooting in 86400 seconds..