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.36' (ECDSA) to the list of known hosts. 2017/08/19 23:14:20 parsed 1 programs 2017/08/19 23:14:20 executed programs: 0 syzkaller login: [ 43.585524] ================================================================== [ 43.586744] BUG: KASAN: use-after-free in userfaultfd_release+0x5c1/0x6e0 [ 43.587721] Read of size 8 at addr ffff8801cdd154e0 by task syz-executor2/3890 [ 43.588759] [ 43.589016] CPU: 1 PID: 3890 Comm: syz-executor2 Not tainted 4.13.0-rc5-next-20170817+ #5 [ 43.590105] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.591326] Call Trace: [ 43.591689] dump_stack+0x194/0x257 [ 43.592215] ? arch_local_irq_restore+0x53/0x53 [ 43.592840] ? show_regs_print_info+0x65/0x65 [ 43.593477] ? is_bpf_text_address+0xa4/0x120 [ 43.594142] ? unwind_get_return_address+0x61/0xa0 [ 43.594887] ? userfaultfd_release+0x5c1/0x6e0 [ 43.595530] print_address_description+0x73/0x250 [ 43.596254] ? userfaultfd_release+0x5c1/0x6e0 [ 43.596874] kasan_report+0x24e/0x340 [ 43.597409] ? userfaultfd_event_wait_completion+0x910/0x910 [ 43.598178] __asan_report_load8_noabort+0x14/0x20 [ 43.598836] userfaultfd_release+0x5c1/0x6e0 [ 43.599551] ? fcntl_setlk+0x10c0/0x10c0 [ 43.600167] ? kmem_cache_free+0x77/0x280 [ 43.600730] ? userfaultfd_event_wait_completion+0x910/0x910 [ 43.601524] ? fsnotify+0x1af0/0x1af0 [ 43.602073] ? rcu_note_context_switch+0x710/0x710 [ 43.602749] ? __might_sleep+0x95/0x190 [ 43.603310] ? userfaultfd_event_wait_completion+0x910/0x910 [ 43.604157] __fput+0x327/0x7e0 [ 43.604659] ? fput+0x140/0x140 [ 43.605126] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.605732] ____fput+0x15/0x20 [ 43.608979] task_work_run+0x199/0x270 [ 43.612847] ? task_work_cancel+0x210/0x210 [ 43.617184] ? _raw_spin_unlock+0x22/0x30 [ 43.621303] ? switch_task_namespaces+0x87/0xc0 [ 43.625948] do_exit+0xa52/0x1b30 [ 43.629377] ? retint_kernel+0x10/0x10 [ 43.633243] ? find_held_lock+0x35/0x1d0 [ 43.637278] ? mm_update_next_owner+0x930/0x930 [ 43.641918] ? userfaultfd_ctx_read+0x935/0x2100 [ 43.646646] ? lock_downgrade+0x990/0x990 [ 43.650769] ? do_raw_spin_trylock+0x190/0x190 [ 43.655330] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 43.660752] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 43.665927] ? _raw_spin_unlock+0x22/0x30 [ 43.670047] ? userfaultfd_ctx_read+0x975/0x2100 [ 43.674787] ? check_noncircular+0x20/0x20 [ 43.679006] ? futex_wait_setup+0x22e/0x3d0 [ 43.683310] ? find_held_lock+0x35/0x1d0 [ 43.687349] ? get_signal+0x855/0x17e0 [ 43.691210] ? lock_downgrade+0x990/0x990 [ 43.695337] do_group_exit+0x149/0x400 [ 43.699196] ? __lock_is_held+0xb6/0x140 [ 43.703228] ? SyS_exit+0x30/0x30 [ 43.706651] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.711120] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.716111] get_signal+0x7e8/0x17e0 [ 43.719823] ? ptrace_notify+0x130/0x130 [ 43.723856] ? check_same_owner+0x320/0x320 [ 43.728151] ? lock_release+0xa40/0xa40 [ 43.732102] ? __might_sleep+0x95/0x190 [ 43.736048] ? wake_up_q+0xe0/0xe0 [ 43.739564] ? kasan_check_read+0x11/0x20 [ 43.743684] ? __fsnotify_parent+0xb4/0x3a0 [ 43.747986] do_signal+0x94/0x1ee0 [ 43.751505] ? rcu_pm_notify+0xc0/0xc0 [ 43.755367] ? setup_sigcontext+0x7d0/0x7d0 [ 43.759663] ? vfs_readv+0x147/0x1c0 [ 43.763349] ? rcu_read_lock_sched_held+0x108/0x120 [ 43.768337] ? kfree+0x1e7/0x250 [ 43.771679] ? vfs_readv+0x14c/0x1c0 [ 43.775365] ? __fget_light+0x297/0x380 [ 43.779320] ? fget_raw+0x20/0x20 [ 43.782746] ? security_mmap_file+0x14e/0x190 [ 43.787220] ? exit_to_usermode_loop+0x98/0x300 [ 43.791872] exit_to_usermode_loop+0x224/0x300 [ 43.796429] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 43.801937] ? __fdget+0x18/0x20 [ 43.805283] syscall_return_slowpath+0x42f/0x500 [ 43.810021] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 43.815019] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 43.819924] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.824913] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.831212] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 43.835940] RIP: 0033:0x4512e9 [ 43.839102] RSP: 002b:00007f1f1264bc08 EFLAGS: 00000216 ORIG_RAX: 0000000000000013 [ 43.846779] RAX: 0000000000000020 RBX: 00000000007182a0 RCX: 00000000004512e9 [ 43.854021] RDX: 0000000000000007 RSI: 0000000020053f90 RDI: 0000000000000007 [ 43.861265] RBP: 0000000000004420 R08: 0000000000000000 R09: 0000000000000000 [ 43.868513] R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b9b23 [ 43.875766] R13: 00000000ffffffff R14: 0000000000000007 R15: 0000000020053f90 [ 43.883025] [ 43.884633] Allocated by task 3859: [ 43.888235] save_stack_trace+0x16/0x20 [ 43.892178] save_stack+0x43/0xd0 [ 43.895601] kasan_kmalloc+0xad/0xe0 [ 43.899287] kasan_slab_alloc+0x12/0x20 [ 43.903314] kmem_cache_alloc+0x12e/0x760 [ 43.907435] dup_userfaultfd+0x21c/0x890 [ 43.911467] copy_mm+0xa27/0x1247 [ 43.914891] copy_process.part.36+0x1ea3/0x4af0 [ 43.919534] _do_fork+0x1ef/0xfb0 [ 43.922958] SyS_clone+0x37/0x50 [ 43.926295] do_syscall_64+0x26c/0x8c0 [ 43.930152] return_from_SYSCALL_64+0x0/0x7a [ 43.934533] [ 43.936133] Freed by task 3859: [ 43.939383] save_stack_trace+0x16/0x20 [ 43.943327] save_stack+0x43/0xd0 [ 43.946752] kasan_slab_free+0x71/0xc0 [ 43.950607] kmem_cache_free+0x77/0x280 [ 43.954551] userfaultfd_ctx_put+0x50c/0x740 [ 43.958931] userfaultfd_event_wait_completion+0x754/0x910 [ 43.964530] dup_userfaultfd_complete+0x2de/0x480 [ 43.969358] copy_mm+0xde2/0x1247 [ 43.972786] copy_process.part.36+0x1ea3/0x4af0 [ 43.977423] _do_fork+0x1ef/0xfb0 [ 43.980850] SyS_clone+0x37/0x50 [ 43.984192] do_syscall_64+0x26c/0x8c0 [ 43.988050] return_from_SYSCALL_64+0x0/0x7a [ 43.992433] [ 43.994040] The buggy address belongs to the object at ffff8801cdd15380 [ 43.994040] which belongs to the cache userfaultfd_ctx_cache of size 360 [ 44.007533] The buggy address is located 352 bytes inside of [ 44.007533] 360-byte region [ffff8801cdd15380, ffff8801cdd154e8) [ 44.019373] The buggy address belongs to the page: [ 44.024271] page:ffffea0007374540 count:1 mapcount:0 mapping:ffff8801cdd15000 index:0xffff8801cdd15ff7 [ 44.033685] flags: 0x200000000000100(slab) [ 44.037890] raw: 0200000000000100 ffff8801cdd15000 ffff8801cdd15ff7 0000000100000009 [ 44.045750] raw: ffffea00073430a0 ffffea0007313520 ffff8801d6ae6540 0000000000000000 [ 44.053600] page dumped because: kasan: bad access detected [ 44.059277] [ 44.060873] Memory state around the buggy address: [ 44.065773] ffff8801cdd15380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.073102] ffff8801cdd15400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.080428] >ffff8801cdd15480: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc [ 44.087756] ^ [ 44.094216] ffff8801cdd15500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 44.101544] ffff8801cdd15580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.108873] ================================================================== [ 44.116201] Disabling lock debugging due to kernel taint [ 44.121718] Kernel panic - not syncing: panic_on_warn set ... [ 44.121718] [ 44.129053] CPU: 1 PID: 3890 Comm: syz-executor2 Tainted: G B 4.13.0-rc5-next-20170817+ #5 [ 44.138549] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.147873] Call Trace: [ 44.150432] dump_stack+0x194/0x257 [ 44.154028] ? arch_local_irq_restore+0x53/0x53 [ 44.158664] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 44.163389] ? userfaultfd_release+0x580/0x6e0 [ 44.167949] panic+0x1e4/0x417 [ 44.171110] ? __warn+0x1d9/0x1d9 [ 44.174535] ? userfaultfd_release+0x5c1/0x6e0 [ 44.179083] kasan_end_report+0x50/0x50 [ 44.183039] kasan_report+0x137/0x340 [ 44.186807] ? userfaultfd_event_wait_completion+0x910/0x910 [ 44.192580] __asan_report_load8_noabort+0x14/0x20 [ 44.197475] userfaultfd_release+0x5c1/0x6e0 [ 44.201855] ? fcntl_setlk+0x10c0/0x10c0 [ 44.205883] ? kmem_cache_free+0x77/0x280 [ 44.210011] ? userfaultfd_event_wait_completion+0x910/0x910 [ 44.215776] ? fsnotify+0x1af0/0x1af0 [ 44.219543] ? rcu_note_context_switch+0x710/0x710 [ 44.224459] ? __might_sleep+0x95/0x190 [ 44.228401] ? userfaultfd_event_wait_completion+0x910/0x910 [ 44.234166] __fput+0x327/0x7e0 [ 44.237416] ? fput+0x140/0x140 [ 44.240663] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.245131] ____fput+0x15/0x20 [ 44.248384] task_work_run+0x199/0x270 [ 44.252246] ? task_work_cancel+0x210/0x210 [ 44.256545] ? _raw_spin_unlock+0x22/0x30 [ 44.260662] ? switch_task_namespaces+0x87/0xc0 [ 44.265302] do_exit+0xa52/0x1b30 [ 44.268730] ? retint_kernel+0x10/0x10 [ 44.272591] ? find_held_lock+0x35/0x1d0 [ 44.276621] ? mm_update_next_owner+0x930/0x930 [ 44.281256] ? userfaultfd_ctx_read+0x935/0x2100 [ 44.285978] ? lock_downgrade+0x990/0x990 [ 44.290704] ? do_raw_spin_trylock+0x190/0x190 [ 44.295259] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 44.300416] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 44.305575] ? _raw_spin_unlock+0x22/0x30 [ 44.309690] ? userfaultfd_ctx_read+0x975/0x2100 [ 44.314426] ? check_noncircular+0x20/0x20 [ 44.318632] ? futex_wait_setup+0x22e/0x3d0 [ 44.322926] ? find_held_lock+0x35/0x1d0 [ 44.326958] ? get_signal+0x855/0x17e0 [ 44.330813] ? lock_downgrade+0x990/0x990 [ 44.334930] do_group_exit+0x149/0x400 [ 44.338786] ? __lock_is_held+0xb6/0x140 [ 44.342814] ? SyS_exit+0x30/0x30 [ 44.346235] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.350707] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 44.355692] get_signal+0x7e8/0x17e0 [ 44.359385] ? ptrace_notify+0x130/0x130 [ 44.363415] ? check_same_owner+0x320/0x320 [ 44.367703] ? lock_release+0xa40/0xa40 [ 44.371648] ? __might_sleep+0x95/0x190 [ 44.375591] ? wake_up_q+0xe0/0xe0 [ 44.379103] ? kasan_check_read+0x11/0x20 [ 44.383217] ? __fsnotify_parent+0xb4/0x3a0 [ 44.387511] do_signal+0x94/0x1ee0 [ 44.391020] ? rcu_pm_notify+0xc0/0xc0 [ 44.394876] ? setup_sigcontext+0x7d0/0x7d0 [ 44.399165] ? vfs_readv+0x147/0x1c0 [ 44.402847] ? rcu_read_lock_sched_held+0x108/0x120 [ 44.407832] ? kfree+0x1e7/0x250 [ 44.411184] ? vfs_readv+0x14c/0x1c0 [ 44.414871] ? __fget_light+0x297/0x380 [ 44.418815] ? fget_raw+0x20/0x20 [ 44.422234] ? security_mmap_file+0x14e/0x190 [ 44.426699] ? exit_to_usermode_loop+0x98/0x300 [ 44.431337] exit_to_usermode_loop+0x224/0x300 [ 44.435889] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 44.441393] ? __fdget+0x18/0x20 [ 44.444731] syscall_return_slowpath+0x42f/0x500 [ 44.449454] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 44.454439] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 44.459337] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 44.464320] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 44.469049] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 44.473773] RIP: 0033:0x4512e9 [ 44.476929] RSP: 002b:00007f1f1264bc08 EFLAGS: 00000216 ORIG_RAX: 0000000000000013 [ 44.484602] RAX: 0000000000000020 RBX: 00000000007182a0 RCX: 00000000004512e9 [ 44.491840] RDX: 0000000000000007 RSI: 0000000020053f90 RDI: 0000000000000007 [ 44.499075] RBP: 0000000000004420 R08: 0000000000000000 R09: 0000000000000000 [ 44.506311] R10: 0000000000000000 R11: 0000000000000216 R12: 00000000004b9b23 [ 44.513547] R13: 00000000ffffffff R14: 0000000000000007 R15: 0000000020053f90 [ 44.520827] Dumping ftrace buffer: [ 44.524337] (ftrace buffer empty) [ 44.528015] Kernel Offset: disabled [ 44.531618] Rebooting in 86400 seconds..