[....] Starting enhanced syslogd: rsyslogd[ 12.528105] audit: type=1400 audit(1514246186.679:4): avc: denied { syslog } for pid=3164 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 'ci-android-49-kasan-gce-1,10.128.0.8' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.320227] ================================================================== [ 20.327613] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.334247] Read of size 8 at addr ffff8801c99194b8 by task syzkaller024100/3319 [ 20.341743] [ 20.343340] CPU: 1 PID: 3319 Comm: syzkaller024100 Not tainted 4.9.71-g2506378 #113 [ 20.351095] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.360420] ffff8801c93478e0 ffffffff81d922b9 ffffea0007264600 ffff8801c99194b8 [ 20.368375] 0000000000000000 ffff8801c99194b8 ffff8801c99194b8 ffff8801c9347918 [ 20.376330] ffffffff8153bab3 ffff8801c99194b8 0000000000000008 0000000000000000 [ 20.384271] Call Trace: [ 20.386826] [] dump_stack+0xc1/0x128 [ 20.392158] [] print_address_description+0x73/0x280 [ 20.398788] [] kasan_report+0x275/0x360 [ 20.404378] [] ? __lock_acquire+0x2eff/0x3640 [ 20.410487] [] __asan_report_load8_noabort+0x14/0x20 [ 20.417204] [] __lock_acquire+0x2eff/0x3640 [ 20.423141] [] ? __lock_acquire+0x629/0x3640 [ 20.429168] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.436155] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.443132] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.450116] [] ? mark_held_locks+0xaf/0x100 [ 20.456055] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.462255] [] lock_acquire+0x12e/0x410 [ 20.467845] [] ? remove_wait_queue+0x14/0x40 [ 20.473869] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.480157] [] ? remove_wait_queue+0x14/0x40 [ 20.486177] [] remove_wait_queue+0x14/0x40 [ 20.492027] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.499005] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.506244] [] ? ep_free+0x1b0/0x1b0 [ 20.511576] [] ep_free+0x96/0x1b0 [ 20.516645] [] ? ep_free+0x1b0/0x1b0 [ 20.521976] [] ep_eventpoll_release+0x44/0x60 [ 20.528090] [] __fput+0x28c/0x6e0 [ 20.533161] [] ____fput+0x15/0x20 [ 20.538229] [] task_work_run+0x115/0x190 [ 20.543909] [] do_exit+0x7e7/0x2a40 [ 20.549157] [] ? selinux_file_ioctl+0x355/0x530 [ 20.555444] [] ? release_task+0x1240/0x1240 [ 20.561389] [] ? SyS_epoll_create+0x190/0x190 [ 20.567499] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.574130] [] do_group_exit+0x108/0x320 [ 20.579809] [] SyS_exit_group+0x1d/0x20 [ 20.585401] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.591942] [ 20.593543] Allocated by task 3319: [ 20.597136] save_stack_trace+0x16/0x20 [ 20.601077] save_stack+0x43/0xd0 [ 20.604492] kasan_kmalloc+0xad/0xe0 [ 20.608174] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.612721] binder_get_thread+0x15d/0x750 [ 20.616921] binder_poll+0x4a/0x210 [ 20.620520] SyS_epoll_ctl+0x11d7/0x2190 [ 20.624549] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.629266] [ 20.630856] Freed by task 3319: [ 20.634115] save_stack_trace+0x16/0x20 [ 20.638074] save_stack+0x43/0xd0 [ 20.641508] kasan_slab_free+0x72/0xc0 [ 20.645373] kfree+0x103/0x300 [ 20.648547] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.653370] binder_thread_release+0x27d/0x540 [ 20.657929] binder_ioctl+0x9c0/0x11b0 [ 20.661798] do_vfs_ioctl+0x1aa/0x1140 [ 20.665662] SyS_ioctl+0x8f/0xc0 [ 20.669006] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.673729] [ 20.675336] The buggy address belongs to the object at ffff8801c9919400 [ 20.675336] which belongs to the cache kmalloc-512 of size 512 [ 20.687969] The buggy address is located 184 bytes inside of [ 20.687969] 512-byte region [ffff8801c9919400, ffff8801c9919600) [ 20.699813] The buggy address belongs to the page: [ 20.704708] page:ffffea0007264600 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.714863] flags: 0x8000000000004080(slab|head) [ 20.719583] page dumped because: kasan: bad access detected [ 20.725259] [ 20.726850] Memory state around the buggy address: [ 20.731742] ffff8801c9919380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.739063] ffff8801c9919400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.746385] >ffff8801c9919480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.753707] ^ [ 20.758857] ffff8801c9919500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.766177] ffff8801c9919580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.773495] ================================================================== [ 20.780813] Disabling lock debugging due to kernel taint [ 20.786230] Kernel panic - not syncing: panic_on_warn set ... [ 20.786230] [ 20.793556] CPU: 1 PID: 3319 Comm: syzkaller024100 Tainted: G B 4.9.71-g2506378 #113 [ 20.802526] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.811847] ffff8801c9347838 ffffffff81d922b9 ffffffff84194b3f ffff8801c9347910 [ 20.819784] 0000000000000000 ffff8801c99194b8 ffff8801c99194b8 ffff8801c9347900 [ 20.827725] ffffffff8142d741 0000000041b58ab3 ffffffff84188580 ffffffff8142d585 [ 20.835669] Call Trace: [ 20.838224] [] dump_stack+0xc1/0x128 [ 20.843554] [] panic+0x1bc/0x3a8 [ 20.848539] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.856729] [] ? add_taint+0x40/0x50 [ 20.862057] [] kasan_end_report+0x50/0x50 [ 20.867822] [] kasan_report+0x167/0x360 [ 20.873411] [] ? __lock_acquire+0x2eff/0x3640 [ 20.879520] [] __asan_report_load8_noabort+0x14/0x20 [ 20.886236] [] __lock_acquire+0x2eff/0x3640 [ 20.892170] [] ? __lock_acquire+0x629/0x3640 [ 20.898190] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.905168] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.912148] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.919126] [] ? mark_held_locks+0xaf/0x100 [ 20.925062] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.931257] [] lock_acquire+0x12e/0x410 [ 20.936844] [] ? remove_wait_queue+0x14/0x40 [ 20.942864] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.949145] [] ? remove_wait_queue+0x14/0x40 [ 20.955164] [] remove_wait_queue+0x14/0x40 [ 20.961103] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.968079] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.975318] [] ? ep_free+0x1b0/0x1b0 [ 20.980647] [] ep_free+0x96/0x1b0 [ 20.985718] [] ? ep_free+0x1b0/0x1b0 [ 20.991052] [] ep_eventpoll_release+0x44/0x60 [ 20.997161] [] __fput+0x28c/0x6e0 [ 21.002227] [] ____fput+0x15/0x20 [ 21.007295] [] task_work_run+0x115/0x190 [ 21.012968] [] do_exit+0x7e7/0x2a40 [ 21.018472] [] ? selinux_file_ioctl+0x355/0x530 [ 21.024753] [] ? release_task+0x1240/0x1240 [ 21.030686] [] ? SyS_epoll_create+0x190/0x190 [ 21.036795] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 21.043428] [] do_group_exit+0x108/0x320 [ 21.049105] [] SyS_exit_group+0x1d/0x20 [ 21.054690] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 21.061657] Dumping ftrace buffer: [ 21.065165] (ftrace buffer empty) [ 21.068841] Kernel Offset: disabled [ 21.072432] Rebooting in 86400 seconds..