INIT: Entering runlevel: 2 [info] Using makefile-style concurrent boot in runlevel 2. [....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?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-upstream-kasan-gce-7,10.128.0.30' (ECDSA) to the list of known hosts. 2017/09/09 19:14:44 parsed 1 programs 2017/09/09 19:14:44 executed programs: 0 2017/09/09 19:14:49 executed programs: 161 2017/09/09 19:14:54 executed programs: 323 syzkaller login: [ 70.291176] ================================================================== [ 70.298578] BUG: KASAN: use-after-free in userfaultfd_release+0x5c1/0x6e0 [ 70.305477] Read of size 8 at addr ffff8801c844e788 by task syz-executor0/4720 [ 70.312811] [ 70.314415] CPU: 1 PID: 4720 Comm: syz-executor0 Not tainted 4.13.0+ #76 [ 70.321225] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 70.330551] Call Trace: [ 70.333113] dump_stack+0x194/0x257 [ 70.336714] ? arch_local_irq_restore+0x53/0x53 [ 70.341356] ? show_regs_print_info+0x65/0x65 [ 70.345828] ? unwind_get_return_address+0x61/0xa0 [ 70.350731] ? userfaultfd_release+0x5c1/0x6e0 [ 70.355285] print_address_description+0x73/0x250 [ 70.360098] ? userfaultfd_release+0x5c1/0x6e0 [ 70.364658] kasan_report+0x24e/0x340 [ 70.368435] ? userfaultfd_event_wait_completion+0x910/0x910 [ 70.374209] __asan_report_load8_noabort+0x14/0x20 [ 70.379114] userfaultfd_release+0x5c1/0x6e0 [ 70.383497] ? fcntl_setlk+0x10d0/0x10d0 [ 70.387535] ? userfaultfd_event_wait_completion+0x910/0x910 [ 70.393305] ? fsnotify+0x1af0/0x1af0 [ 70.397085] ? __might_sleep+0x95/0x190 [ 70.401031] ? userfaultfd_event_wait_completion+0x910/0x910 [ 70.406800] __fput+0x333/0x7f0 [ 70.410056] ? fput+0x140/0x140 [ 70.413310] ? _raw_spin_unlock_irq+0x27/0x70 [ 70.417785] ____fput+0x15/0x20 [ 70.421037] task_work_run+0x199/0x270 [ 70.424899] ? task_work_cancel+0x210/0x210 [ 70.429196] ? _raw_spin_unlock+0x22/0x30 [ 70.433316] ? switch_task_namespaces+0x87/0xc0 [ 70.437960] do_exit+0xa52/0x1b40 [ 70.441386] ? unwind_dump+0x4c0/0x4c0 [ 70.445244] ? get_unused_fd_flags+0x190/0x190 [ 70.449809] ? mm_update_next_owner+0x930/0x930 [ 70.454453] ? __save_stack_trace+0x61/0xd0 [ 70.458752] ? SyS_read+0xef/0x220 [ 70.462264] ? save_stack_trace+0x16/0x20 [ 70.466384] ? __lock_acquire+0x20fd/0x4620 [ 70.470681] ? check_noncircular+0x20/0x20 [ 70.474894] ? check_noncircular+0x20/0x20 [ 70.479104] ? check_noncircular+0x20/0x20 [ 70.483324] ? __pmd_alloc+0x4e0/0x4e0 [ 70.487187] ? find_held_lock+0x39/0x1d0 [ 70.491231] ? lock_downgrade+0x990/0x990 [ 70.495351] ? recalc_sigpending_tsk+0x117/0x150 [ 70.500078] ? recalc_sigpending+0x103/0x160 [ 70.504455] ? recalc_sigpending_tsk+0x150/0x150 [ 70.509181] ? get_signal+0x397/0x17e0 [ 70.513055] do_group_exit+0x149/0x400 [ 70.516916] ? __lock_is_held+0xbc/0x140 [ 70.520949] ? SyS_exit+0x30/0x30 [ 70.524575] ? _raw_spin_unlock_irq+0x27/0x70 [ 70.529045] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 70.534038] get_signal+0x7e8/0x17e0 [ 70.537751] ? ptrace_notify+0x130/0x130 [ 70.541790] ? retint_kernel+0x10/0x10 [ 70.545650] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 70.550637] ? __fsnotify_update_child_dentry_flags.part.2+0x2a0/0x2a0 [ 70.557272] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 70.562004] ? retint_kernel+0x10/0x10 [ 70.565873] do_signal+0x94/0x1ee0 [ 70.569386] ? copy_user_generic_unrolled+0x89/0xc0 [ 70.574375] ? _copy_to_user+0xa2/0xc0 [ 70.578237] ? setup_sigcontext+0x7d0/0x7d0 [ 70.582531] ? userfaultfd_read+0x1ac/0x220 [ 70.586832] ? userfaultfd_ctx_read+0x20f0/0x20f0 [ 70.591662] ? file_has_perm+0x2c2/0x500 [ 70.595697] ? do_iter_readv_writev+0x7f0/0x7f0 [ 70.600337] ? selinux_capset+0x100/0x100 [ 70.604466] ? fsnotify+0x1af0/0x1af0 [ 70.608241] ? exit_to_usermode_loop+0x98/0x300 [ 70.612890] exit_to_usermode_loop+0x224/0x300 [ 70.617447] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 70.622961] ? rw_verify_area+0xe5/0x2b0 [ 70.626994] ? __fdget_raw+0x20/0x20 [ 70.630684] syscall_return_slowpath+0x42f/0x500 [ 70.635523] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 70.640511] ? SyS_read+0x184/0x220 [ 70.644111] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 70.649015] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 70.654002] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 70.658734] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 70.663459] RIP: 0033:0x451e59 [ 70.666619] RSP: 002b:00007f1914e7dc08 EFLAGS: 00000216 ORIG_RAX: 0000000000000000 [ 70.674302] RAX: 0000000000000020 RBX: 0000000000718000 RCX: 0000000000451e59 [ 70.681555] RDX: 0000000000000020 RSI: 0000000020517f87 RDI: 0000000000000005 [ 70.688797] RBP: 00000000000044c0 R08: 0000000000000000 R09: 0000000000000000 [ 70.696038] R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004ba1ce [ 70.703277] R13: 00000000ffffffff R14: 0000000000000005 R15: 0000000020517f87 [ 70.710534] [ 70.712133] Allocated by task 4721: [ 70.715733] save_stack_trace+0x16/0x20 [ 70.719677] save_stack+0x43/0xd0 [ 70.723102] kasan_kmalloc+0xad/0xe0 [ 70.726787] kasan_slab_alloc+0x12/0x20 [ 70.730730] kmem_cache_alloc+0x12e/0x760 [ 70.734848] dup_userfaultfd+0x21c/0x890 [ 70.738885] copy_mm+0xa38/0x1310 [ 70.742310] copy_process.part.36+0x1ecf/0x4c00 [ 70.746951] _do_fork+0x1ef/0xfe0 [ 70.750377] SyS_clone+0x37/0x50 [ 70.753719] do_syscall_64+0x26c/0x8c0 [ 70.757580] return_from_SYSCALL_64+0x0/0x7a [ 70.761977] [ 70.763575] Freed by task 4721: [ 70.766831] save_stack_trace+0x16/0x20 [ 70.770776] save_stack+0x43/0xd0 [ 70.774205] kasan_slab_free+0x71/0xc0 [ 70.778063] kmem_cache_free+0x77/0x280 [ 70.782007] userfaultfd_ctx_put+0x50c/0x740 [ 70.786387] userfaultfd_event_wait_completion+0x754/0x910 [ 70.791986] dup_userfaultfd_complete+0x2de/0x480 [ 70.796797] copy_mm+0xe9b/0x1310 [ 70.800220] copy_process.part.36+0x1ecf/0x4c00 [ 70.804858] _do_fork+0x1ef/0xfe0 [ 70.808292] SyS_clone+0x37/0x50 [ 70.811630] do_syscall_64+0x26c/0x8c0 [ 70.815490] return_from_SYSCALL_64+0x0/0x7a [ 70.819869] [ 70.821469] The buggy address belongs to the object at ffff8801c844e600 [ 70.821469] which belongs to the cache userfaultfd_ctx_cache of size 400 [ 70.834964] The buggy address is located 392 bytes inside of [ 70.834964] 400-byte region [ffff8801c844e600, ffff8801c844e790) [ 70.846806] The buggy address belongs to the page: [ 70.851705] page:ffffea0007211380 count:1 mapcount:0 mapping:ffff8801c844e000 index:0xffff8801ca4e7240 [ 70.861123] flags: 0x200000000000100(slab) [ 70.865330] raw: 0200000000000100 ffff8801c844e000 ffff8801ca4e7240 0000000100000008 [ 70.873181] raw: ffffea0007293f60 ffff8801d5653d50 ffff8801d5651780 0000000000000000 [ 70.881039] page dumped because: kasan: bad access detected [ 70.886728] [ 70.888326] Memory state around the buggy address: [ 70.893226] ffff8801c844e680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.900554] ffff8801c844e700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.907883] >ffff8801c844e780: fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 70.915208] ^ [ 70.918805] ffff8801c844e800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 70.926134] ffff8801c844e880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 70.933461] ================================================================== [ 70.940797] Disabling lock debugging due to kernel taint [ 70.946277] Kernel panic - not syncing: panic_on_warn set ... [ 70.946277] [ 70.953610] CPU: 1 PID: 4720 Comm: syz-executor0 Tainted: G B 4.13.0+ #76 [ 70.961631] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 70.970953] Call Trace: [ 70.973508] dump_stack+0x194/0x257 [ 70.977103] ? arch_local_irq_restore+0x53/0x53 [ 70.981744] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 70.986466] ? userfaultfd_release+0x4f0/0x6e0 [ 70.991012] panic+0x1e4/0x417 [ 70.994171] ? __warn+0x1d9/0x1d9 [ 70.997593] ? userfaultfd_release+0x5c1/0x6e0 [ 71.002139] kasan_end_report+0x50/0x50 [ 71.006078] kasan_report+0x137/0x340 [ 71.009842] ? userfaultfd_event_wait_completion+0x910/0x910 [ 71.015604] __asan_report_load8_noabort+0x14/0x20 [ 71.020498] userfaultfd_release+0x5c1/0x6e0 [ 71.024876] ? fcntl_setlk+0x10d0/0x10d0 [ 71.028905] ? userfaultfd_event_wait_completion+0x910/0x910 [ 71.034670] ? fsnotify+0x1af0/0x1af0 [ 71.038439] ? __might_sleep+0x95/0x190 [ 71.042380] ? userfaultfd_event_wait_completion+0x910/0x910 [ 71.048143] __fput+0x333/0x7f0 [ 71.051402] ? fput+0x140/0x140 [ 71.054648] ? _raw_spin_unlock_irq+0x27/0x70 [ 71.059108] ____fput+0x15/0x20 [ 71.062353] task_work_run+0x199/0x270 [ 71.066210] ? task_work_cancel+0x210/0x210 [ 71.070500] ? _raw_spin_unlock+0x22/0x30 [ 71.074613] ? switch_task_namespaces+0x87/0xc0 [ 71.079247] do_exit+0xa52/0x1b40 [ 71.082665] ? unwind_dump+0x4c0/0x4c0 [ 71.086517] ? get_unused_fd_flags+0x190/0x190 [ 71.091069] ? mm_update_next_owner+0x930/0x930 [ 71.095704] ? __save_stack_trace+0x61/0xd0 [ 71.099993] ? SyS_read+0xef/0x220 [ 71.103499] ? save_stack_trace+0x16/0x20 [ 71.107610] ? __lock_acquire+0x20fd/0x4620 [ 71.111907] ? check_noncircular+0x20/0x20 [ 71.116111] ? check_noncircular+0x20/0x20 [ 71.120317] ? check_noncircular+0x20/0x20 [ 71.124530] ? __pmd_alloc+0x4e0/0x4e0 [ 71.128386] ? find_held_lock+0x39/0x1d0 [ 71.132420] ? lock_downgrade+0x990/0x990 [ 71.136532] ? recalc_sigpending_tsk+0x117/0x150 [ 71.141253] ? recalc_sigpending+0x103/0x160 [ 71.145625] ? recalc_sigpending_tsk+0x150/0x150 [ 71.150347] ? get_signal+0x397/0x17e0 [ 71.154202] do_group_exit+0x149/0x400 [ 71.158055] ? __lock_is_held+0xbc/0x140 [ 71.162080] ? SyS_exit+0x30/0x30 [ 71.165498] ? _raw_spin_unlock_irq+0x27/0x70 [ 71.169959] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 71.174942] get_signal+0x7e8/0x17e0 [ 71.178634] ? ptrace_notify+0x130/0x130 [ 71.182661] ? retint_kernel+0x10/0x10 [ 71.186516] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 71.191496] ? __fsnotify_update_child_dentry_flags.part.2+0x2a0/0x2a0 [ 71.198125] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 71.202850] ? retint_kernel+0x10/0x10 [ 71.206706] do_signal+0x94/0x1ee0 [ 71.210212] ? copy_user_generic_unrolled+0x89/0xc0 [ 71.215195] ? _copy_to_user+0xa2/0xc0 [ 71.219048] ? setup_sigcontext+0x7d0/0x7d0 [ 71.223344] ? userfaultfd_read+0x1ac/0x220 [ 71.227636] ? userfaultfd_ctx_read+0x20f0/0x20f0 [ 71.232450] ? file_has_perm+0x2c2/0x500 [ 71.236479] ? do_iter_readv_writev+0x7f0/0x7f0 [ 71.241119] ? selinux_capset+0x100/0x100 [ 71.245237] ? fsnotify+0x1af0/0x1af0 [ 71.249002] ? exit_to_usermode_loop+0x98/0x300 [ 71.253638] exit_to_usermode_loop+0x224/0x300 [ 71.258188] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 71.263690] ? rw_verify_area+0xe5/0x2b0 [ 71.267717] ? __fdget_raw+0x20/0x20 [ 71.271399] syscall_return_slowpath+0x42f/0x500 [ 71.276120] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 71.281110] ? SyS_read+0x184/0x220 [ 71.284718] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 71.289623] ? trace_hardirqs_on_caller+0x421/0x5c0