[....] Starting enhanced syslogd: rsyslogd[ 13.806993] audit: type=1400 audit(1515557704.062:4): avc: denied { syslog } for pid=3177 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.31' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.542431] ================================================================== [ 24.550024] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 24.556685] Read of size 8 at addr ffff8801c8aaf4b8 by task syzkaller490535/3326 [ 24.564184] [ 24.565803] CPU: 0 PID: 3326 Comm: syzkaller490535 Not tainted 4.9.75-g8910fa5 #9 [ 24.573388] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.582715] ffff8801c98578e0 ffffffff81d93049 ffffea000722ab80 ffff8801c8aaf4b8 [ 24.590690] 0000000000000000 ffff8801c8aaf4b8 ffff8801c8aaf4b8 ffff8801c9857918 [ 24.598646] ffffffff8153ca53 ffff8801c8aaf4b8 0000000000000008 0000000000000000 [ 24.606611] Call Trace: [ 24.609172] [] dump_stack+0xc1/0x128 [ 24.614504] [] print_address_description+0x73/0x280 [ 24.621136] [] kasan_report+0x275/0x360 [ 24.626739] [] ? __lock_acquire+0x2eff/0x3640 [ 24.632859] [] __asan_report_load8_noabort+0x14/0x20 [ 24.639580] [] __lock_acquire+0x2eff/0x3640 [ 24.645520] [] ? __lock_acquire+0x629/0x3640 [ 24.651547] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.658539] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.665546] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.665550] [] ? mark_held_locks+0xaf/0x100 [ 24.665559] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.665563] [] lock_acquire+0x12e/0x410 [ 24.665567] [] ? remove_wait_queue+0x14/0x40 [ 24.665571] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.665574] [] ? remove_wait_queue+0x14/0x40 [ 24.665578] [] remove_wait_queue+0x14/0x40 [ 24.665589] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.665593] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.665597] [] ? ep_free+0x1b0/0x1b0 [ 24.665600] [] ep_free+0x96/0x1b0 [ 24.665603] [] ? ep_free+0x1b0/0x1b0 [ 24.665607] [] ep_eventpoll_release+0x44/0x60 [ 24.665613] [] __fput+0x28c/0x6e0 [ 24.665617] [] ____fput+0x15/0x20 [ 24.665623] [] task_work_run+0x115/0x190 [ 24.665629] [] do_exit+0x7e7/0x2a40 [ 24.665637] [] ? selinux_file_ioctl+0x355/0x530 [ 24.665641] [] ? release_task+0x1240/0x1240 [ 24.665645] [] ? SyS_epoll_create+0x190/0x190 [ 24.665649] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 24.665653] [] do_group_exit+0x108/0x320 [ 24.665657] [] SyS_exit_group+0x1d/0x20 [ 24.665661] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 24.665663] [ 24.665666] Allocated by task 3326: [ 24.665672] save_stack_trace+0x16/0x20 [ 24.665675] save_stack+0x43/0xd0 [ 24.665678] kasan_kmalloc+0xad/0xe0 [ 24.665682] kmem_cache_alloc_trace+0xfb/0x2a0 [ 24.665687] binder_get_thread+0x15d/0x750 [ 24.665690] binder_poll+0x4a/0x210 [ 24.665693] SyS_epoll_ctl+0x11d7/0x2190 [ 24.665696] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 24.665697] [ 24.665698] Freed by task 3326: [ 24.665701] save_stack_trace+0x16/0x20 [ 24.665703] save_stack+0x43/0xd0 [ 24.665706] kasan_slab_free+0x72/0xc0 [ 24.665709] kfree+0x103/0x300 [ 24.665712] binder_thread_dec_tmpref+0x1cc/0x240 [ 24.665716] binder_thread_release+0x27d/0x540 [ 24.665718] binder_ioctl+0x9c0/0x11b0 [ 24.665723] do_vfs_ioctl+0x1aa/0x1140 [ 24.665725] SyS_ioctl+0x8f/0xc0 [ 24.665728] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 24.665729] [ 24.665732] The buggy address belongs to the object at ffff8801c8aaf400 [ 24.665732] which belongs to the cache kmalloc-512 of size 512 [ 24.665735] The buggy address is located 184 bytes inside of [ 24.665735] 512-byte region [ffff8801c8aaf400, ffff8801c8aaf600) [ 24.665736] The buggy address belongs to the page: [ 24.665743] page:ffffea000722ab80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.665746] flags: 0x8000000000004080(slab|head) [ 24.665748] page dumped because: kasan: bad access detected [ 24.665749] [ 24.665750] Memory state around the buggy address: [ 24.665754] ffff8801c8aaf380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.665757] ffff8801c8aaf400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.665759] >ffff8801c8aaf480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.665760] ^ [ 24.665763] ffff8801c8aaf500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.665765] ffff8801c8aaf580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.665767] ================================================================== [ 24.665768] Disabling lock debugging due to kernel taint [ 24.665771] Kernel panic - not syncing: panic_on_warn set ... [ 24.665771] [ 24.665777] CPU: 0 PID: 3326 Comm: syzkaller490535 Tainted: G B 4.9.75-g8910fa5 #9 [ 24.665779] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.665786] ffff8801c9857838 ffffffff81d93049 ffffffff84195be7 ffff8801c9857910 [ 24.665791] 0000000000000000 ffff8801c8aaf4b8 ffff8801c8aaf4b8 ffff8801c9857900 [ 24.665795] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 24.665796] Call Trace: [ 24.665800] [] dump_stack+0xc1/0x128 [ 24.665807] [] panic+0x1bc/0x3a8 [ 24.665811] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 24.665815] [] ? add_taint+0x40/0x50 [ 24.665819] [] kasan_end_report+0x50/0x50 [ 24.665823] [] kasan_report+0x167/0x360 [ 24.665827] [] ? __lock_acquire+0x2eff/0x3640 [ 24.665831] [] __asan_report_load8_noabort+0x14/0x20 [ 24.665835] [] __lock_acquire+0x2eff/0x3640 [ 24.665839] [] ? __lock_acquire+0x629/0x3640 [ 24.665843] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.665847] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.665852] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.665856] [] ? mark_held_locks+0xaf/0x100 [ 24.665860] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.665864] [] lock_acquire+0x12e/0x410 [ 24.665867] [] ? remove_wait_queue+0x14/0x40 [ 24.665871] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.665874] [] ? remove_wait_queue+0x14/0x40 [ 24.665878] [] remove_wait_queue+0x14/0x40 [ 24.665882] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.665886] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.665889] [] ? ep_free+0x1b0/0x1b0 [ 24.665892] [] ep_free+0x96/0x1b0 [ 24.665896] [] ? ep_free+0x1b0/0x1b0 [ 24.665899] [] ep_eventpoll_release+0x44/0x60 [ 24.665903] [] __fput+0x28c/0x6e0 [ 24.665907] [] ____fput+0x15/0x20 [ 24.665910] [] task_work_run+0x115/0x190 [ 24.665914] [] do_exit+0x7e7/0x2a40 [ 24.665918] [] ? selinux_file_ioctl+0x355/0x530 [ 24.665922] [] ? release_task+0x1240/0x1240 [ 24.665926] [] ? SyS_epoll_create+0x190/0x190 [ 24.665929] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 24.665933] [] do_group_exit+0x108/0x320 [ 24.665937] [] SyS_exit_group+0x1d/0x20 [ 24.665941] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 24.672641] Dumping ftrace buffer: [ 24.672645] (ftrace buffer empty) [ 24.672647] Kernel Offset: disabled [ 25.292406] Rebooting in 86400 seconds..