[....] Starting enhanced syslogd: rsyslogd[ 13.000141] audit: type=1400 audit(1514569943.396:4): avc: denied { syslog } for pid=3168 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.208' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.744339] ================================================================== [ 24.751727] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 24.758360] Read of size 8 at addr ffff8801c8ed25b8 by task syzkaller157009/3324 [ 24.765858] [ 24.767455] CPU: 1 PID: 3324 Comm: syzkaller157009 Not tainted 4.9.73-gf3f3457 #1 [ 24.775040] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.784364] ffff8801cbfef8e0 ffffffff81d922b9 ffffea000723b480 ffff8801c8ed25b8 [ 24.792312] 0000000000000000 ffff8801c8ed25b8 ffff8801c8ed25b8 ffff8801cbfef918 [ 24.800257] ffffffff8153bab3 ffff8801c8ed25b8 0000000000000008 0000000000000000 [ 24.808204] Call Trace: [ 24.810760] [] dump_stack+0xc1/0x128 [ 24.816093] [] print_address_description+0x73/0x280 [ 24.822733] [] kasan_report+0x275/0x360 [ 24.828324] [] ? __lock_acquire+0x2eff/0x3640 [ 24.834438] [] __asan_report_load8_noabort+0x14/0x20 [ 24.841159] [] __lock_acquire+0x2eff/0x3640 [ 24.847101] [] ? __lock_acquire+0x629/0x3640 [ 24.853127] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.860106] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.867086] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.874065] [] ? mark_held_locks+0xaf/0x100 [ 24.880015] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.886217] [] lock_acquire+0x12e/0x410 [ 24.891807] [] ? remove_wait_queue+0x14/0x40 [ 24.897832] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.904122] [] ? remove_wait_queue+0x14/0x40 [ 24.910152] [] remove_wait_queue+0x14/0x40 [ 24.916003] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.922982] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.930226] [] ? ep_free+0x1b0/0x1b0 [ 24.935557] [] ep_free+0x96/0x1b0 [ 24.940624] [] ? ep_free+0x1b0/0x1b0 [ 24.945959] [] ep_eventpoll_release+0x44/0x60 [ 24.952071] [] __fput+0x28c/0x6e0 [ 24.957141] [] ____fput+0x15/0x20 [ 24.962208] [] task_work_run+0x115/0x190 [ 24.967890] [] do_exit+0x7e7/0x2a40 [ 24.973133] [] ? selinux_file_ioctl+0x355/0x530 [ 24.979415] [] ? release_task+0x1240/0x1240 [ 24.985351] [] ? SyS_epoll_create+0x190/0x190 [ 24.991470] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 24.998101] [] do_group_exit+0x108/0x320 [ 25.003778] [] SyS_exit_group+0x1d/0x20 [ 25.009370] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 25.015911] [ 25.017503] Allocated by task 3324: [ 25.021094] save_stack_trace+0x16/0x20 [ 25.025039] save_stack+0x43/0xd0 [ 25.028456] kasan_kmalloc+0xad/0xe0 [ 25.032134] kmem_cache_alloc_trace+0xfb/0x2a0 [ 25.036689] binder_get_thread+0x15d/0x750 [ 25.040893] binder_poll+0x4a/0x210 [ 25.044487] SyS_epoll_ctl+0x11d7/0x2190 [ 25.048511] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 25.053229] [ 25.054820] Freed by task 3324: [ 25.058062] save_stack_trace+0x16/0x20 [ 25.062002] save_stack+0x43/0xd0 [ 25.065420] kasan_slab_free+0x72/0xc0 [ 25.069272] kfree+0x103/0x300 [ 25.072430] binder_thread_dec_tmpref+0x1cc/0x240 [ 25.077237] binder_thread_release+0x27d/0x540 [ 25.081784] binder_ioctl+0x9c0/0x11b0 [ 25.085645] do_vfs_ioctl+0x1aa/0x1140 [ 25.089495] SyS_ioctl+0x8f/0xc0 [ 25.092825] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 25.097541] [ 25.099135] The buggy address belongs to the object at ffff8801c8ed2500 [ 25.099135] which belongs to the cache kmalloc-512 of size 512 [ 25.111763] The buggy address is located 184 bytes inside of [ 25.111763] 512-byte region [ffff8801c8ed2500, ffff8801c8ed2700) [ 25.123601] The buggy address belongs to the page: [ 25.128499] page:ffffea000723b480 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 25.138664] flags: 0x8000000000004080(slab|head) [ 25.143381] page dumped because: kasan: bad access detected [ 25.149061] [ 25.150651] Memory state around the buggy address: [ 25.155543] ffff8801c8ed2480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.162866] ffff8801c8ed2500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.170192] >ffff8801c8ed2580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.177515] ^ [ 25.182668] ffff8801c8ed2600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.189992] ffff8801c8ed2680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.197319] ================================================================== [ 25.204639] Disabling lock debugging due to kernel taint [ 25.210053] Kernel panic - not syncing: panic_on_warn set ... [ 25.210053] [ 25.217382] CPU: 1 PID: 3324 Comm: syzkaller157009 Tainted: G B 4.9.73-gf3f3457 #1 [ 25.226180] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.235504] ffff8801cbfef838 ffffffff81d922b9 ffffffff841955bf ffff8801cbfef910 [ 25.243457] 0000000000000000 ffff8801c8ed25b8 ffff8801c8ed25b8 ffff8801cbfef900 [ 25.251419] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 25.259375] Call Trace: [ 25.261933] [] dump_stack+0xc1/0x128 [ 25.267260] [] panic+0x1bc/0x3a8 [ 25.272243] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 25.280435] [] ? add_taint+0x40/0x50 [ 25.285765] [] kasan_end_report+0x50/0x50 [ 25.291526] [] kasan_report+0x167/0x360 [ 25.297115] [] ? __lock_acquire+0x2eff/0x3640 [ 25.303226] [] __asan_report_load8_noabort+0x14/0x20 [ 25.309944] [] __lock_acquire+0x2eff/0x3640 [ 25.315885] [] ? __lock_acquire+0x629/0x3640 [ 25.321907] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.328884] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.335862] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.342842] [] ? mark_held_locks+0xaf/0x100 [ 25.348778] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.354982] [] lock_acquire+0x12e/0x410 [ 25.360571] [] ? remove_wait_queue+0x14/0x40 [ 25.366595] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.372887] [] ? remove_wait_queue+0x14/0x40 [ 25.378910] [] remove_wait_queue+0x14/0x40 [ 25.384770] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.391756] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.398993] [] ? ep_free+0x1b0/0x1b0 [ 25.404329] [] ep_free+0x96/0x1b0 [ 25.409401] [] ? ep_free+0x1b0/0x1b0 [ 25.414729] [] ep_eventpoll_release+0x44/0x60 [ 25.420837] [] __fput+0x28c/0x6e0 [ 25.425902] [] ____fput+0x15/0x20 [ 25.430967] [] task_work_run+0x115/0x190 [ 25.436642] [] do_exit+0x7e7/0x2a40 [ 25.441886] [] ? selinux_file_ioctl+0x355/0x530 [ 25.448167] [] ? release_task+0x1240/0x1240 [ 25.454103] [] ? SyS_epoll_create+0x190/0x190 [ 25.460215] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 25.466856] [] do_group_exit+0x108/0x320 [ 25.472533] [] SyS_exit_group+0x1d/0x20 [ 25.478129] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 25.484717] Dumping ftrace buffer: [ 25.488223] (ftrace buffer empty) [ 25.491900] Kernel Offset: disabled [ 25.495499] Rebooting in 86400 seconds..