[....] Starting enhanced syslogd: rsyslogd[ 10.189401] audit: type=1400 audit(1515075600.455:4): avc: denied { syslog } for pid=3169 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.15.232' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 21.768720] ================================================================== [ 21.769915] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 21.770809] Read of size 8 at addr ffff8801cad4efb8 by task syzkaller168523/3324 [ 21.771792] [ 21.772026] CPU: 0 PID: 3324 Comm: syzkaller168523 Not tainted 4.9.74-g173c52e #4 [ 21.773038] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.774271] ffff8801c88278e0 ffffffff81d91b09 ffffea00072b5380 ffff8801cad4efb8 [ 21.775404] 0000000000000000 ffff8801cad4efb8 ffff8801cad4efb8 ffff8801c8827918 [ 21.776548] ffffffff8153b503 ffff8801cad4efb8 0000000000000008 0000000000000000 [ 21.777741] Call Trace: [ 21.778110] [] dump_stack+0xc1/0x128 [ 21.778825] [] print_address_description+0x73/0x280 [ 21.779745] [] kasan_report+0x275/0x360 [ 21.780488] [] ? __lock_acquire+0x2eff/0x3640 [ 21.781307] [] __asan_report_load8_noabort+0x14/0x20 [ 21.782209] [] __lock_acquire+0x2eff/0x3640 [ 21.783050] [] ? __lock_acquire+0x629/0x3640 [ 21.783848] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.784766] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.785737] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.786655] [] ? mark_held_locks+0xaf/0x100 [ 21.787481] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.788312] [] lock_acquire+0x12e/0x410 [ 21.790439] [] ? remove_wait_queue+0x14/0x40 [ 21.796463] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.802754] [] ? remove_wait_queue+0x14/0x40 [ 21.808776] [] remove_wait_queue+0x14/0x40 [ 21.814630] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.821608] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.828845] [] ? ep_free+0x1b0/0x1b0 [ 21.834173] [] ep_free+0x96/0x1b0 [ 21.839247] [] ? ep_free+0x1b0/0x1b0 [ 21.844582] [] ep_eventpoll_release+0x44/0x60 [ 21.850696] [] __fput+0x28c/0x6e0 [ 21.855764] [] ____fput+0x15/0x20 [ 21.860832] [] task_work_run+0x115/0x190 [ 21.866511] [] do_exit+0x7e7/0x2a40 [ 21.871765] [] ? selinux_file_ioctl+0x355/0x530 [ 21.878056] [] ? release_task+0x1240/0x1240 [ 21.883993] [] ? SyS_epoll_create+0x190/0x190 [ 21.890112] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 21.896743] [] do_group_exit+0x108/0x320 [ 21.902420] [] SyS_exit_group+0x1d/0x20 [ 21.908010] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 21.914553] [ 21.916149] Allocated by task 3324: [ 21.919740] save_stack_trace+0x16/0x20 [ 21.923678] save_stack+0x43/0xd0 [ 21.927092] kasan_kmalloc+0xad/0xe0 [ 21.930769] kmem_cache_alloc_trace+0xfb/0x2a0 [ 21.935320] binder_get_thread+0x15d/0x750 [ 21.939518] binder_poll+0x4a/0x210 [ 21.943108] SyS_epoll_ctl+0x11d7/0x2190 [ 21.947130] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 21.951846] [ 21.953438] Freed by task 3324: [ 21.956679] save_stack_trace+0x16/0x20 [ 21.960618] save_stack+0x43/0xd0 [ 21.964035] kasan_slab_free+0x72/0xc0 [ 21.967887] kfree+0x103/0x300 [ 21.971044] binder_thread_dec_tmpref+0x1cc/0x240 [ 21.975851] binder_thread_release+0x27d/0x540 [ 21.980397] binder_ioctl+0x9c0/0x11b0 [ 21.984249] do_vfs_ioctl+0x1aa/0x1140 [ 21.988099] SyS_ioctl+0x8f/0xc0 [ 21.991430] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 21.996148] [ 21.997743] The buggy address belongs to the object at ffff8801cad4ef00 [ 21.997743] which belongs to the cache kmalloc-512 of size 512 [ 22.010363] The buggy address is located 184 bytes inside of [ 22.010363] 512-byte region [ffff8801cad4ef00, ffff8801cad4f100) [ 22.022202] The buggy address belongs to the page: [ 22.027097] page:ffffea00072b5380 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 22.037251] flags: 0x8000000000004080(slab|head) [ 22.041978] page dumped because: kasan: bad access detected [ 22.047652] [ 22.049251] Memory state around the buggy address: [ 22.054164] ffff8801cad4ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.061488] ffff8801cad4ef00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.068824] >ffff8801cad4ef80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.076153] ^ [ 22.081307] ffff8801cad4f000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.088631] ffff8801cad4f080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.095953] ================================================================== [ 22.103278] Disabling lock debugging due to kernel taint [ 22.108693] Kernel panic - not syncing: panic_on_warn set ... [ 22.108693] [ 22.116022] CPU: 0 PID: 3324 Comm: syzkaller168523 Tainted: G B 4.9.74-g173c52e #4 [ 22.124820] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.134153] ffff8801c8827838 ffffffff81d91b09 ffffffff841955df ffff8801c8827910 [ 22.142118] 0000000000000000 ffff8801cad4efb8 ffff8801cad4efb8 ffff8801c8827900 [ 22.150074] ffffffff8142d161 0000000041b58ab3 ffffffff84189020 ffffffff8142cfa5 [ 22.158023] Call Trace: [ 22.160581] [] dump_stack+0xc1/0x128 [ 22.165917] [] panic+0x1bc/0x3a8 [ 22.170898] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 22.179102] [] ? add_taint+0x40/0x50 [ 22.184434] [] kasan_end_report+0x50/0x50 [ 22.190197] [] kasan_report+0x167/0x360 [ 22.195790] [] ? __lock_acquire+0x2eff/0x3640 [ 22.201899] [] __asan_report_load8_noabort+0x14/0x20 [ 22.208620] [] __lock_acquire+0x2eff/0x3640 [ 22.214557] [] ? __lock_acquire+0x629/0x3640 [ 22.220578] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.227555] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.234535] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.241516] [] ? mark_held_locks+0xaf/0x100 [ 22.247455] [] ? mutex_lock_nested+0x5e3/0x870 [ 22.253652] [] lock_acquire+0x12e/0x410 [ 22.259240] [] ? remove_wait_queue+0x14/0x40 [ 22.265265] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 22.271547] [] ? remove_wait_queue+0x14/0x40 [ 22.277569] [] remove_wait_queue+0x14/0x40 [ 22.283424] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 22.290400] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 22.297638] [] ? ep_free+0x1b0/0x1b0 [ 22.302966] [] ep_free+0x96/0x1b0 [ 22.308033] [] ? ep_free+0x1b0/0x1b0 [ 22.313362] [] ep_eventpoll_release+0x44/0x60 [ 22.319474] [] __fput+0x28c/0x6e0 [ 22.324542] [] ____fput+0x15/0x20 [ 22.329613] [] task_work_run+0x115/0x190 [ 22.335289] [] do_exit+0x7e7/0x2a40 [ 22.340536] [] ? selinux_file_ioctl+0x355/0x530 [ 22.346821] [] ? release_task+0x1240/0x1240 [ 22.352759] [] ? SyS_epoll_create+0x190/0x190 [ 22.358868] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 22.365498] [] do_group_exit+0x108/0x320 [ 22.371174] [] SyS_exit_group+0x1d/0x20 [ 22.376762] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.383782] Dumping ftrace buffer: [ 22.387288] (ftrace buffer empty) [ 22.390965] Kernel Offset: disabled [ 22.394559] Rebooting in 86400 seconds..