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-next-kasan-gce-1,10.128.0.24' (ECDSA) to the list of known hosts. 2017/08/19 22:23:03 parsed 1 programs 2017/08/19 22:23:03 executed programs: 0 syzkaller login: [ 55.321710] ================================================================== [ 55.322836] BUG: KASAN: use-after-free in userfaultfd_release+0x5c1/0x6e0 [ 55.323781] Read of size 8 at addr ffff8801c7830a20 by task syz-executor2/5515 [ 55.324779] [ 55.325066] CPU: 1 PID: 5515 Comm: syz-executor2 Not tainted 4.13.0-rc5-next-20170817+ #5 [ 55.326242] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 55.327493] Call Trace: [ 55.327867] dump_stack+0x194/0x257 [ 55.328399] ? arch_local_irq_restore+0x53/0x53 [ 55.329147] ? show_regs_print_info+0x65/0x65 [ 55.329807] ? is_bpf_text_address+0xa4/0x120 [ 55.330447] ? unwind_get_return_address+0x61/0xa0 [ 55.331168] ? userfaultfd_release+0x5c1/0x6e0 [ 55.331854] print_address_description+0x73/0x250 [ 55.332552] ? userfaultfd_release+0x5c1/0x6e0 [ 55.333212] kasan_report+0x24e/0x340 [ 55.333763] ? userfaultfd_event_wait_completion+0x910/0x910 [ 55.334636] __asan_report_load8_noabort+0x14/0x20 [ 55.335353] userfaultfd_release+0x5c1/0x6e0 [ 55.336009] ? fcntl_setlk+0x10c0/0x10c0 [ 55.336573] ? kmem_cache_free+0x77/0x280 [ 55.337207] ? userfaultfd_event_wait_completion+0x910/0x910 [ 55.338052] ? fsnotify+0x1af0/0x1af0 [ 55.338584] ? rcu_note_context_switch+0x710/0x710 [ 55.339285] ? __might_sleep+0x95/0x190 [ 55.339843] ? userfaultfd_event_wait_completion+0x910/0x910 [ 55.340648] __fput+0x327/0x7e0 [ 55.341121] ? fput+0x140/0x140 [ 55.341598] ? _raw_spin_unlock_irq+0x27/0x70 [ 55.342229] ____fput+0x15/0x20 [ 55.345499] task_work_run+0x199/0x270 [ 55.349384] ? task_work_cancel+0x210/0x210 [ 55.353701] ? _raw_spin_unlock+0x22/0x30 [ 55.357834] ? switch_task_namespaces+0x87/0xc0 [ 55.362494] do_exit+0xa52/0x1b30 [ 55.365954] ? find_held_lock+0x35/0x1d0 [ 55.370012] ? mm_update_next_owner+0x930/0x930 [ 55.374675] ? userfaultfd_ctx_read+0x935/0x2100 [ 55.379426] ? lock_downgrade+0x990/0x990 [ 55.383567] ? do_raw_spin_trylock+0x190/0x190 [ 55.388157] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 55.393341] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 55.398517] ? _raw_spin_unlock+0x22/0x30 [ 55.402650] ? userfaultfd_ctx_read+0x975/0x2100 [ 55.407416] ? check_noncircular+0x20/0x20 [ 55.411645] ? futex_wait_setup+0x22e/0x3d0 [ 55.415971] ? find_held_lock+0x35/0x1d0 [ 55.420035] ? get_signal+0x855/0x17e0 [ 55.423916] ? lock_downgrade+0x990/0x990 [ 55.428069] do_group_exit+0x149/0x400 [ 55.431948] ? __lock_is_held+0xb6/0x140 [ 55.435998] ? SyS_exit+0x30/0x30 [ 55.439436] ? _raw_spin_unlock_irq+0x27/0x70 [ 55.443925] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 55.448937] get_signal+0x7e8/0x17e0 [ 55.452689] ? ptrace_notify+0x130/0x130 [ 55.456735] ? check_same_owner+0x320/0x320 [ 55.461034] ? lock_release+0xa40/0xa40 [ 55.464992] ? __might_sleep+0x95/0x190 [ 55.468942] ? wake_up_q+0xe0/0xe0 [ 55.472465] ? kasan_check_read+0x11/0x20 [ 55.476605] ? __fsnotify_parent+0xb4/0x3a0 [ 55.480931] do_signal+0x94/0x1ee0 [ 55.484471] ? rcu_pm_notify+0xc0/0xc0 [ 55.488341] ? setup_sigcontext+0x7d0/0x7d0 [ 55.492653] ? vfs_readv+0x147/0x1c0 [ 55.496352] ? rcu_read_lock_sched_held+0x108/0x120 [ 55.501346] ? kfree+0x1e7/0x250 [ 55.504710] ? vfs_readv+0x14c/0x1c0 [ 55.508412] ? __fget_light+0x297/0x380 [ 55.512387] ? down_write+0x120/0x120 [ 55.516179] ? security_mmap_file+0x14e/0x190 [ 55.520664] ? exit_to_usermode_loop+0x98/0x300 [ 55.525311] exit_to_usermode_loop+0x224/0x300 [ 55.529886] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 55.535406] ? kmem_cache_free+0x249/0x280 [ 55.539637] syscall_return_slowpath+0x42f/0x500 [ 55.544386] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 55.549394] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 55.554310] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 55.559316] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 55.564066] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 55.568796] RIP: 0033:0x4512e9 [ 55.571963] RSP: 002b:00007f36a3362c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000013 [ 55.579655] RAX: 0000000000000020 RBX: 0000000000718150 RCX: 00000000004512e9 [ 55.586911] RDX: 0000000000000007 RSI: 0000000020053f90 RDI: 0000000000000007 [ 55.594159] RBP: 0000000000004420 R08: 0000000000000000 R09: 0000000000000000 [ 55.601397] R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b9b23 [ 55.608642] R13: 00000000ffffffff R14: 0000000000000007 R15: 0000000020053f90 [ 55.615907] [ 55.617511] Allocated by task 5495: [ 55.621109] save_stack_trace+0x16/0x20 [ 55.625063] save_stack+0x43/0xd0 [ 55.628502] kasan_kmalloc+0xad/0xe0 [ 55.632199] kasan_slab_alloc+0x12/0x20 [ 55.636159] kmem_cache_alloc+0x12e/0x760 [ 55.640287] dup_userfaultfd+0x21c/0x890 [ 55.644319] copy_mm+0xa27/0x1247 [ 55.647739] copy_process.part.36+0x1ea3/0x4af0 [ 55.652382] _do_fork+0x1ef/0xfb0 [ 55.655820] SyS_clone+0x37/0x50 [ 55.659175] do_syscall_64+0x26c/0x8c0 [ 55.663048] return_from_SYSCALL_64+0x0/0x7a [ 55.667426] [ 55.669034] Freed by task 5495: [ 55.672295] save_stack_trace+0x16/0x20 [ 55.676242] save_stack+0x43/0xd0 [ 55.679664] kasan_slab_free+0x71/0xc0 [ 55.683519] kmem_cache_free+0x77/0x280 [ 55.687459] userfaultfd_ctx_put+0x50c/0x740 [ 55.691833] userfaultfd_event_wait_completion+0x754/0x910 [ 55.697431] dup_userfaultfd_complete+0x2de/0x480 [ 55.702262] copy_mm+0xde2/0x1247 [ 55.705695] copy_process.part.36+0x1ea3/0x4af0 [ 55.710333] _do_fork+0x1ef/0xfb0 [ 55.713752] SyS_clone+0x37/0x50 [ 55.717087] do_syscall_64+0x26c/0x8c0 [ 55.720943] return_from_SYSCALL_64+0x0/0x7a [ 55.725316] [ 55.726912] The buggy address belongs to the object at ffff8801c78308c0 [ 55.726912] which belongs to the cache userfaultfd_ctx_cache of size 360 [ 55.740413] The buggy address is located 352 bytes inside of [ 55.740413] 360-byte region [ffff8801c78308c0, ffff8801c7830a28) [ 55.752254] The buggy address belongs to the page: [ 55.757152] page:ffffea00071e0c00 count:1 mapcount:0 mapping:ffff8801c7830000 index:0xffff8801c7830ff7 [ 55.766572] flags: 0x200000000000100(slab) [ 55.770776] raw: 0200000000000100 ffff8801c7830000 ffff8801c7830ff7 0000000100000009 [ 55.778631] raw: ffffea00071e9ba0 ffffea0007218c20 ffff8801d6515780 0000000000000000 [ 55.786477] page dumped because: kasan: bad access detected [ 55.792151] [ 55.793745] Memory state around the buggy address: [ 55.798643] ffff8801c7830900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 55.806008] ffff8801c7830980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 55.813343] >ffff8801c7830a00: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc [ 55.820666] ^ [ 55.825041] ffff8801c7830a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 55.832367] ffff8801c7830b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 55.839692] ================================================================== [ 55.847020] Disabling lock debugging due to kernel taint [ 55.852539] Kernel panic - not syncing: panic_on_warn set ... [ 55.852539] [ 55.859894] CPU: 1 PID: 5515 Comm: syz-executor2 Tainted: G B 4.13.0-rc5-next-20170817+ #5 [ 55.869398] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 55.878718] Call Trace: [ 55.881275] dump_stack+0x194/0x257 [ 55.884883] ? arch_local_irq_restore+0x53/0x53 [ 55.889523] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 55.894255] ? userfaultfd_release+0x580/0x6e0 [ 55.898806] panic+0x1e4/0x417 [ 55.901964] ? __warn+0x1d9/0x1d9 [ 55.905387] ? userfaultfd_release+0x5c1/0x6e0 [ 55.909936] kasan_end_report+0x50/0x50 [ 55.913877] kasan_report+0x137/0x340 [ 55.917644] ? userfaultfd_event_wait_completion+0x910/0x910 [ 55.923406] __asan_report_load8_noabort+0x14/0x20 [ 55.928299] userfaultfd_release+0x5c1/0x6e0 [ 55.932672] ? fcntl_setlk+0x10c0/0x10c0 [ 55.936697] ? kmem_cache_free+0x77/0x280 [ 55.940813] ? userfaultfd_event_wait_completion+0x910/0x910 [ 55.946575] ? fsnotify+0x1af0/0x1af0 [ 55.950341] ? rcu_note_context_switch+0x710/0x710 [ 55.955240] ? __might_sleep+0x95/0x190 [ 55.959181] ? userfaultfd_event_wait_completion+0x910/0x910 [ 55.964942] __fput+0x327/0x7e0 [ 55.968191] ? fput+0x140/0x140 [ 55.971437] ? _raw_spin_unlock_irq+0x27/0x70 [ 55.975900] ____fput+0x15/0x20 [ 55.979148] task_work_run+0x199/0x270 [ 55.983004] ? task_work_cancel+0x210/0x210 [ 55.987299] ? _raw_spin_unlock+0x22/0x30 [ 55.991414] ? switch_task_namespaces+0x87/0xc0 [ 55.996052] do_exit+0xa52/0x1b30 [ 55.999478] ? find_held_lock+0x35/0x1d0 [ 56.003506] ? mm_update_next_owner+0x930/0x930 [ 56.008140] ? userfaultfd_ctx_read+0x935/0x2100 [ 56.012861] ? lock_downgrade+0x990/0x990 [ 56.016980] ? do_raw_spin_trylock+0x190/0x190 [ 56.021535] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 56.026692] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 56.031851] ? _raw_spin_unlock+0x22/0x30 [ 56.035963] ? userfaultfd_ctx_read+0x975/0x2100 [ 56.040688] ? check_noncircular+0x20/0x20 [ 56.044893] ? futex_wait_setup+0x22e/0x3d0 [ 56.049189] ? find_held_lock+0x35/0x1d0 [ 56.053221] ? get_signal+0x855/0x17e0 [ 56.057074] ? lock_downgrade+0x990/0x990 [ 56.061192] do_group_exit+0x149/0x400 [ 56.065044] ? __lock_is_held+0xb6/0x140 [ 56.069071] ? SyS_exit+0x30/0x30 [ 56.072490] ? _raw_spin_unlock_irq+0x27/0x70 [ 56.076957] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 56.081938] get_signal+0x7e8/0x17e0 [ 56.085633] ? ptrace_notify+0x130/0x130 [ 56.089659] ? check_same_owner+0x320/0x320 [ 56.093944] ? lock_release+0xa40/0xa40 [ 56.097891] ? __might_sleep+0x95/0x190 [ 56.101830] ? wake_up_q+0xe0/0xe0 [ 56.105337] ? kasan_check_read+0x11/0x20 [ 56.109459] ? __fsnotify_parent+0xb4/0x3a0 [ 56.113752] do_signal+0x94/0x1ee0 [ 56.117265] ? rcu_pm_notify+0xc0/0xc0 [ 56.121119] ? setup_sigcontext+0x7d0/0x7d0 [ 56.125407] ? vfs_readv+0x147/0x1c0 [ 56.129088] ? rcu_read_lock_sched_held+0x108/0x120 [ 56.134071] ? kfree+0x1e7/0x250 [ 56.137403] ? vfs_readv+0x14c/0x1c0 [ 56.141081] ? __fget_light+0x297/0x380 [ 56.145030] ? down_write+0x120/0x120 [ 56.148806] ? security_mmap_file+0x14e/0x190 [ 56.153270] ? exit_to_usermode_loop+0x98/0x300 [ 56.157912] exit_to_usermode_loop+0x224/0x300 [ 56.162464] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 56.167968] ? kmem_cache_free+0x249/0x280 [ 56.172172] syscall_return_slowpath+0x42f/0x500 [ 56.176895] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 56.181880] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 56.186778] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 56.191760] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 56.196496] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 56.201217] RIP: 0033:0x4512e9 [ 56.204380] RSP: 002b:00007f36a3362c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000013 [ 56.212055] RAX: 0000000000000020 RBX: 0000000000718150 RCX: 00000000004512e9 [ 56.219294] RDX: 0000000000000007 RSI: 0000000020053f90 RDI: 0000000000000007 [ 56.226532] RBP: 0000000000004420 R08: 0000000000000000 R09: 0000000000000000 [ 56.233769] R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b9b23 [ 56.241006] R13: 00000000ffffffff R14: 0000000000000007 R15: 0000000020053f90 [ 56.248611] Dumping ftrace buffer: [ 56.252125] (ftrace buffer empty) [ 56.255799] Kernel Offset: disabled [ 56.259394] Rebooting in 86400 seconds..