[....] Starting enhanced syslogd: rsyslogd[ 13.068645] audit: type=1400 audit(1514352752.273:4): avc: denied { syslog } for pid=3176 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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 'ci-android-49-kasan-gce-8,10.128.0.59' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.781298] ================================================================== [ 25.788687] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 25.795320] Read of size 8 at addr ffff8801c893d238 by task syzkaller570097/3332 [ 25.802820] [ 25.804420] CPU: 0 PID: 3332 Comm: syzkaller570097 Not tainted 4.9.71-g2506378 #113 [ 25.812179] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.821504] ffff8801c82ef8e0 ffffffff81d922b9 ffffea0007224f00 ffff8801c893d238 [ 25.829466] 0000000000000000 ffff8801c893d238 ffff8801c893d238 ffff8801c82ef918 [ 25.837424] ffffffff8153bab3 ffff8801c893d238 0000000000000008 0000000000000000 [ 25.845377] Call Trace: [ 25.847938] [] dump_stack+0xc1/0x128 [ 25.853273] [] print_address_description+0x73/0x280 [ 25.859904] [] kasan_report+0x275/0x360 [ 25.865497] [] ? __lock_acquire+0x2eff/0x3640 [ 25.871612] [] __asan_report_load8_noabort+0x14/0x20 [ 25.878328] [] __lock_acquire+0x2eff/0x3640 [ 25.884263] [] ? __lock_acquire+0x629/0x3640 [ 25.890287] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.897276] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.904280] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.911260] [] ? mark_held_locks+0xaf/0x100 [ 25.917198] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.923395] [] lock_acquire+0x12e/0x410 [ 25.928983] [] ? remove_wait_queue+0x14/0x40 [ 25.935007] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.941291] [] ? remove_wait_queue+0x14/0x40 [ 25.947406] [] remove_wait_queue+0x14/0x40 [ 25.953262] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.960240] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.967481] [] ? ep_free+0x1b0/0x1b0 [ 25.972810] [] ep_free+0x96/0x1b0 [ 25.977878] [] ? ep_free+0x1b0/0x1b0 [ 25.983207] [] ep_eventpoll_release+0x44/0x60 [ 25.990017] [] __fput+0x28c/0x6e0 [ 25.995084] [] ____fput+0x15/0x20 [ 26.000155] [] task_work_run+0x115/0x190 [ 26.005838] [] do_exit+0x7e7/0x2a40 [ 26.011088] [] ? selinux_file_ioctl+0x355/0x530 [ 26.017378] [] ? release_task+0x1240/0x1240 [ 26.023324] [] ? SyS_epoll_create+0x190/0x190 [ 26.029438] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 26.036074] [] do_group_exit+0x108/0x320 [ 26.041765] [] SyS_exit_group+0x1d/0x20 [ 26.047361] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 26.053914] [ 26.055510] Allocated by task 3332: [ 26.059104] save_stack_trace+0x16/0x20 [ 26.063053] save_stack+0x43/0xd0 [ 26.066971] kasan_kmalloc+0xad/0xe0 [ 26.070651] kmem_cache_alloc_trace+0xfb/0x2a0 [ 26.075201] binder_get_thread+0x15d/0x750 [ 26.079441] binder_poll+0x4a/0x210 [ 26.083037] SyS_epoll_ctl+0x11d7/0x2190 [ 26.087062] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 26.091780] [ 26.093374] Freed by task 3332: [ 26.096621] save_stack_trace+0x16/0x20 [ 26.100557] save_stack+0x43/0xd0 [ 26.103975] kasan_slab_free+0x72/0xc0 [ 26.107824] kfree+0x103/0x300 [ 26.110990] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.115798] binder_thread_release+0x27d/0x540 [ 26.120346] binder_ioctl+0x9c0/0x11b0 [ 26.124198] do_vfs_ioctl+0x1aa/0x1140 [ 26.128051] SyS_ioctl+0x8f/0xc0 [ 26.131381] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 26.136096] [ 26.137690] The buggy address belongs to the object at ffff8801c893d180 [ 26.137690] which belongs to the cache kmalloc-512 of size 512 [ 26.150310] The buggy address is located 184 bytes inside of [ 26.150310] 512-byte region [ffff8801c893d180, ffff8801c893d380) [ 26.162146] The buggy address belongs to the page: [ 26.167042] page:ffffea0007224f00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.177199] flags: 0x8000000000004080(slab|head) [ 26.181918] page dumped because: kasan: bad access detected [ 26.187601] [ 26.189192] Memory state around the buggy address: [ 26.194085] ffff8801c893d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.201409] ffff8801c893d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.208734] >ffff8801c893d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.216057] ^ [ 26.221211] ffff8801c893d280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.228532] ffff8801c893d300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.235854] ================================================================== [ 26.243184] Disabling lock debugging due to kernel taint [ 26.248607] Kernel panic - not syncing: panic_on_warn set ... [ 26.248607] [ 26.255937] CPU: 0 PID: 3332 Comm: syzkaller570097 Tainted: G B 4.9.71-g2506378 #113 [ 26.264908] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.274229] ffff8801c82ef838 ffffffff81d922b9 ffffffff84194b3f ffff8801c82ef910 [ 26.282190] 0000000000000000 ffff8801c893d238 ffff8801c893d238 ffff8801c82ef900 [ 26.290140] ffffffff8142d741 0000000041b58ab3 ffffffff84188580 ffffffff8142d585 [ 26.298115] Call Trace: [ 26.300673] [] dump_stack+0xc1/0x128 [ 26.306006] [] panic+0x1bc/0x3a8 [ 26.310989] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.319188] [] ? add_taint+0x40/0x50 [ 26.324518] [] kasan_end_report+0x50/0x50 [ 26.330280] [] kasan_report+0x167/0x360 [ 26.335873] [] ? __lock_acquire+0x2eff/0x3640 [ 26.341982] [] __asan_report_load8_noabort+0x14/0x20 [ 26.348706] [] __lock_acquire+0x2eff/0x3640 [ 26.354662] [] ? __lock_acquire+0x629/0x3640 [ 26.360685] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.367671] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.374650] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.381627] [] ? mark_held_locks+0xaf/0x100 [ 26.387566] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.393764] [] lock_acquire+0x12e/0x410 [ 26.399354] [] ? remove_wait_queue+0x14/0x40 [ 26.405463] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.411749] [] ? remove_wait_queue+0x14/0x40 [ 26.417772] [] remove_wait_queue+0x14/0x40 [ 26.423627] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.430606] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.437846] [] ? ep_free+0x1b0/0x1b0 [ 26.443366] [] ep_free+0x96/0x1b0 [ 26.448443] [] ? ep_free+0x1b0/0x1b0 [ 26.453776] [] ep_eventpoll_release+0x44/0x60 [ 26.459891] [] __fput+0x28c/0x6e0 [ 26.464961] [] ____fput+0x15/0x20 [ 26.470034] [] task_work_run+0x115/0x190 [ 26.475710] [] do_exit+0x7e7/0x2a40 [ 26.480966] [] ? selinux_file_ioctl+0x355/0x530 [ 26.487251] [] ? release_task+0x1240/0x1240 [ 26.493191] [] ? SyS_epoll_create+0x190/0x190 [ 26.499307] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 26.505954] [] do_group_exit+0x108/0x320 [ 26.511644] [] SyS_exit_group+0x1d/0x20 [ 26.517238] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 26.524203] Dumping ftrace buffer: [ 26.527717] (ftrace buffer empty) [ 26.531395] Kernel Offset: disabled [ 26.534989] Rebooting in 86400 seconds..