[....] Starting enhanced syslogd: rsyslogd[ 9.619121] audit: type=1400 audit(1515764526.171:4): avc: denied { syslog } for pid=3170 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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.20' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 48.203923] ================================================================== [ 48.205044] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 48.205932] Read of size 8 at addr ffff8801cd6afc38 by task syzkaller709849/3349 [ 48.206914] [ 48.207144] CPU: 0 PID: 3349 Comm: syzkaller709849 Not tainted 4.9.76-g9154940 #10 [ 48.208162] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.209584] ffff8801c80af8e0 ffffffff81d93149 ffffea000735ab80 ffff8801cd6afc38 [ 48.210751] 0000000000000000 ffff8801cd6afc38 ffff8801cd6afc38 ffff8801c80af918 [ 48.211924] ffffffff8153cb43 ffff8801cd6afc38 0000000000000008 0000000000000000 [ 48.213048] Call Trace: [ 48.213418] [] dump_stack+0xc1/0x128 [ 48.214129] [] print_address_description+0x73/0x280 [ 48.215003] [] kasan_report+0x275/0x360 [ 48.215760] [] ? __lock_acquire+0x2eff/0x3640 [ 48.216570] [] __asan_report_load8_noabort+0x14/0x20 [ 48.217456] [] __lock_acquire+0x2eff/0x3640 [ 48.218243] [] ? __lock_acquire+0x629/0x3640 [ 48.219040] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 48.219962] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 48.220897] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 48.221831] [] ? mark_held_locks+0xaf/0x100 [ 48.222645] [] ? mutex_lock_nested+0x5e3/0x870 [ 48.223483] [] lock_acquire+0x12e/0x410 [ 48.225530] [] ? remove_wait_queue+0x14/0x40 [ 48.231555] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 48.237837] [] ? remove_wait_queue+0x14/0x40 [ 48.243866] [] remove_wait_queue+0x14/0x40 [ 48.249728] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 48.256706] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 48.263946] [] ? ep_free+0x1b0/0x1b0 [ 48.269288] [] ep_free+0x96/0x1b0 [ 48.274363] [] ? ep_free+0x1b0/0x1b0 [ 48.279726] [] ep_eventpoll_release+0x44/0x60 [ 48.285858] [] __fput+0x28c/0x6e0 [ 48.290953] [] ____fput+0x15/0x20 [ 48.296040] [] task_work_run+0x115/0x190 [ 48.301738] [] do_exit+0x7e7/0x2a40 [ 48.307006] [] ? selinux_file_ioctl+0x355/0x530 [ 48.313315] [] ? release_task+0x1240/0x1240 [ 48.319281] [] ? SyS_epoll_create+0x190/0x190 [ 48.325416] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 48.332074] [] do_group_exit+0x108/0x320 [ 48.337778] [] SyS_exit_group+0x1d/0x20 [ 48.343395] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 48.349950] [ 48.351570] Allocated by task 3349: [ 48.355184] save_stack_trace+0x16/0x20 [ 48.359143] save_stack+0x43/0xd0 [ 48.362586] kasan_kmalloc+0xad/0xe0 [ 48.366284] kmem_cache_alloc_trace+0xfb/0x2a0 [ 48.370856] binder_get_thread+0x15d/0x750 [ 48.375469] binder_poll+0x4a/0x210 [ 48.379083] SyS_epoll_ctl+0x11d7/0x2190 [ 48.383439] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 48.388177] [ 48.389780] Freed by task 3349: [ 48.393028] save_stack_trace+0x16/0x20 [ 48.396970] save_stack+0x43/0xd0 [ 48.400395] kasan_slab_free+0x72/0xc0 [ 48.404245] kfree+0x103/0x300 [ 48.407406] binder_thread_dec_tmpref+0x1cc/0x240 [ 48.412219] binder_thread_release+0x27d/0x540 [ 48.416763] binder_ioctl+0x9c0/0x11b0 [ 48.420617] do_vfs_ioctl+0x1aa/0x1140 [ 48.424477] SyS_ioctl+0x8f/0xc0 [ 48.427806] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 48.432526] [ 48.434121] The buggy address belongs to the object at ffff8801cd6afb80 [ 48.434121] which belongs to the cache kmalloc-512 of size 512 [ 48.446740] The buggy address is located 184 bytes inside of [ 48.446740] 512-byte region [ffff8801cd6afb80, ffff8801cd6afd80) [ 48.458576] The buggy address belongs to the page: [ 48.463471] page:ffffea000735ab80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 48.473650] flags: 0x8000000000004080(slab|head) [ 48.478376] page dumped because: kasan: bad access detected [ 48.484047] [ 48.485638] Memory state around the buggy address: [ 48.490538] ffff8801cd6afb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 48.497871] ffff8801cd6afb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.505195] >ffff8801cd6afc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.512534] ^ [ 48.517698] ffff8801cd6afc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.525020] ffff8801cd6afd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 48.532341] ================================================================== [ 48.539662] Disabling lock debugging due to kernel taint [ 48.545074] Kernel panic - not syncing: panic_on_warn set ... [ 48.545074] [ 48.552402] CPU: 0 PID: 3349 Comm: syzkaller709849 Tainted: G B 4.9.76-g9154940 #10 [ 48.561287] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.570609] ffff8801c80af838 ffffffff81d93149 ffffffff84195c17 ffff8801c80af910 [ 48.578566] 0000000000000000 ffff8801cd6afc38 ffff8801cd6afc38 ffff8801c80af900 [ 48.586525] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 48.594473] Call Trace: [ 48.597031] [] dump_stack+0xc1/0x128 [ 48.602372] [] panic+0x1bc/0x3a8 [ 48.607352] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 48.615555] [] ? add_taint+0x40/0x50 [ 48.620883] [] kasan_end_report+0x50/0x50 [ 48.626644] [] kasan_report+0x167/0x360 [ 48.632259] [] ? __lock_acquire+0x2eff/0x3640 [ 48.638368] [] __asan_report_load8_noabort+0x14/0x20 [ 48.645084] [] __lock_acquire+0x2eff/0x3640 [ 48.651026] [] ? __lock_acquire+0x629/0x3640 [ 48.657048] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 48.664026] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 48.671012] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 48.677993] [] ? mark_held_locks+0xaf/0x100 [ 48.683930] [] ? mutex_lock_nested+0x5e3/0x870 [ 48.690125] [] lock_acquire+0x12e/0x410 [ 48.695721] [] ? remove_wait_queue+0x14/0x40 [ 48.701753] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 48.708035] [] ? remove_wait_queue+0x14/0x40 [ 48.714057] [] remove_wait_queue+0x14/0x40 [ 48.719907] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 48.726884] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 48.734121] [] ? ep_free+0x1b0/0x1b0 [ 48.739451] [] ep_free+0x96/0x1b0 [ 48.744518] [] ? ep_free+0x1b0/0x1b0 [ 48.749847] [] ep_eventpoll_release+0x44/0x60 [ 48.755966] [] __fput+0x28c/0x6e0 [ 48.761032] [] ____fput+0x15/0x20 [ 48.766103] [] task_work_run+0x115/0x190 [ 48.771793] [] do_exit+0x7e7/0x2a40 [ 48.777037] [] ? selinux_file_ioctl+0x355/0x530 [ 48.783319] [] ? release_task+0x1240/0x1240 [ 48.789255] [] ? SyS_epoll_create+0x190/0x190 [ 48.795366] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 48.802001] [] do_group_exit+0x108/0x320 [ 48.807681] [] SyS_exit_group+0x1d/0x20 [ 48.813273] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 48.819858] Dumping ftrace buffer: [ 48.823374] (ftrace buffer empty) [ 48.827050] Kernel Offset: disabled [ 48.830643] Rebooting in 86400 seconds..