2017/08/19 12:37:09 parsed 1 programs 2017/08/19 12:37:09 executed programs: 0 syzkaller login: [ 30.441327] ================================================================== [ 30.443773] BUG: KASAN: use-after-free in userfaultfd_release+0x5c1/0x6e0 [ 30.446080] Read of size 8 at addr ffff88003b4526a0 by task syz-executor5/5645 [ 30.448077] [ 30.448473] CPU: 3 PID: 5645 Comm: syz-executor5 Not tainted 4.13.0-rc5-next-20170817+ #5 [ 30.450206] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 30.452189] Call Trace: [ 30.452624] dump_stack+0x194/0x257 [ 30.453191] ? arch_local_irq_restore+0x53/0x53 [ 30.453816] ? show_regs_print_info+0x65/0x65 [ 30.454423] ? is_bpf_text_address+0xa4/0x120 [ 30.455028] ? unwind_get_return_address+0x61/0xa0 [ 30.455666] ? userfaultfd_release+0x5c1/0x6e0 [ 30.456288] print_address_description+0x73/0x250 [ 30.456887] ? userfaultfd_release+0x5c1/0x6e0 [ 30.457494] kasan_report+0x24e/0x340 [ 30.457974] ? userfaultfd_event_wait_completion+0x910/0x910 [ 30.458735] __asan_report_load8_noabort+0x14/0x20 [ 30.459331] userfaultfd_release+0x5c1/0x6e0 [ 30.459847] ? fcntl_setlk+0x10c0/0x10c0 [ 30.460356] ? kmem_cache_free+0x77/0x280 [ 30.460920] ? do_exit+0xa33/0x1b30 [ 30.461491] ? userfaultfd_event_wait_completion+0x910/0x910 [ 30.462181] ? fsnotify+0x1af0/0x1af0 [ 30.462611] ? rcu_note_context_switch+0x710/0x710 [ 30.463149] ? __might_sleep+0x95/0x190 [ 30.463608] ? userfaultfd_event_wait_completion+0x910/0x910 [ 30.464385] __fput+0x327/0x7e0 [ 30.464759] ? fput+0x140/0x140 [ 30.465114] ? do_raw_spin_trylock+0x190/0x190 [ 30.465526] ____fput+0x15/0x20 [ 30.465845] task_work_run+0x199/0x270 [ 30.466213] ? task_work_cancel+0x210/0x210 [ 30.466674] ? _raw_spin_unlock+0x22/0x30 [ 30.467129] ? switch_task_namespaces+0x87/0xc0 [ 30.467693] do_exit+0xa52/0x1b30 [ 30.468162] ? mm_update_next_owner+0x930/0x930 [ 30.468637] ? plist_check_head+0x130/0x130 [ 30.469060] ? do_raw_spin_trylock+0x190/0x190 [ 30.469492] ? schedule+0x108/0x440 [ 30.469821] ? lock_downgrade+0x990/0x990 [ 30.470224] ? __schedule+0x2070/0x2070 [ 30.470583] ? check_same_owner+0x320/0x320 [ 30.470984] ? rcu_note_context_switch+0x710/0x710 [ 30.471387] ? futex_wait_setup+0x14a/0x3d0 [ 30.471725] ? __might_sleep+0x95/0x190 [ 30.472046] ? _cond_resched+0x14/0x30 [ 30.472964] ? futex_wait_queue_me+0x524/0x7e0 [ 30.473427] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 30.474077] ? get_futex_value_locked+0xc3/0xf0 [ 30.474626] ? futex_wait_setup+0x22e/0x3d0 [ 30.475007] ? futex_wake+0x680/0x680 [ 30.475314] ? __dequeue_signal+0x103/0x7b0 [ 30.475667] ? recalc_sigpending_tsk+0x117/0x150 [ 30.476050] ? get_signal+0x855/0x17e0 [ 30.476354] ? lock_downgrade+0x990/0x990 [ 30.476680] do_group_exit+0x149/0x400 [ 30.477008] ? SyS_exit+0x30/0x30 [ 30.477262] ? wake_up_q+0x80/0xe0 [ 30.477509] get_signal+0x7e8/0x17e0 [ 30.477783] ? ptrace_notify+0x130/0x130 [ 30.478090] ? exit_robust_list+0x240/0x240 [ 30.478389] ? lock_acquire+0x1d5/0x580 [ 30.478663] ? __fget+0x333/0x570 [ 30.478918] do_signal+0x94/0x1ee0 [ 30.479175] ? lock_release+0xa40/0xa40 [ 30.479452] ? setup_sigcontext+0x7d0/0x7d0 [ 30.479762] ? lock_acquire+0x1d5/0x580 [ 30.480062] ? __fget+0x35c/0x570 [ 30.480308] ? trace_hardirqs_on+0xd/0x10 [ 30.480597] exit_to_usermode_loop+0x224/0x300 [ 30.480914] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 30.481324] ? fget_raw+0x20/0x20 [ 30.481588] syscall_return_slowpath+0x42f/0x500 [ 30.481996] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 30.482521] ? preempt_notifier_dec+0x20/0x20 [ 30.482906] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.483244] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 30.483604] RIP: 0033:0x446739 [ 30.483920] RSP: 002b:00007f17c7a76cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 30.484456] RAX: 0000000000000000 RBX: 0000000000708170 RCX: 0000000000446739 [ 30.485009] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708170 [ 30.485539] RBP: 0000000000708150 R08: 0000000000000000 R09: 0000000000000000 [ 30.486074] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 30.486664] R13: 0000000000000000 R14: 00007f17c7a779c0 R15: 00007f17c7a77700 [ 30.487200] [ 30.487308] Allocated by task 5648: [ 30.487545] save_stack_trace+0x16/0x20 [ 30.487805] save_stack+0x43/0xd0 [ 30.488039] kasan_kmalloc+0xad/0xe0 [ 30.488309] kasan_slab_alloc+0x12/0x20 [ 30.488672] kmem_cache_alloc+0x12e/0x760 [ 30.488989] dup_userfaultfd+0x21c/0x890 [ 30.489416] copy_mm+0xa27/0x1247 [ 30.489766] copy_process.part.36+0x1ea3/0x4af0 [ 30.490224] _do_fork+0x1ef/0xfb0 [ 30.490564] SyS_clone+0x37/0x50 [ 30.490848] do_syscall_64+0x26c/0x8c0 [ 30.491112] return_from_SYSCALL_64+0x0/0x7a [ 30.491418] [ 30.491537] Freed by task 5648: [ 30.491778] save_stack_trace+0x16/0x20 [ 30.492059] save_stack+0x43/0xd0 [ 30.492323] kasan_slab_free+0x71/0xc0 [ 30.492585] kmem_cache_free+0x77/0x280 [ 30.492834] userfaultfd_ctx_put+0x50c/0x740 [ 30.493192] userfaultfd_event_wait_completion+0x754/0x910 [ 30.494055] dup_userfaultfd_complete+0x2de/0x480 [ 30.494452] copy_mm+0xde2/0x1247 [ 30.494675] copy_process.part.36+0x1ea3/0x4af0 [ 30.494975] _do_fork+0x1ef/0xfb0 [ 30.495252] SyS_clone+0x37/0x50 [ 30.495486] do_syscall_64+0x26c/0x8c0 [ 30.495740] return_from_SYSCALL_64+0x0/0x7a [ 30.496088] [ 30.496198] The buggy address belongs to the object at ffff88003b452540 [ 30.496198] which belongs to the cache userfaultfd_ctx_cache of size 360 [ 30.497075] The buggy address is located 352 bytes inside of [ 30.497075] 360-byte region [ffff88003b452540, ffff88003b4526a8) [ 30.497909] The buggy address belongs to the page: [ 30.498264] page:ffffea0000ed1480 count:1 mapcount:0 mapping:ffff88003b452000 index:0xffff88003b452ff7 [ 30.498868] flags: 0x100000000000100(slab) [ 30.499178] raw: 0100000000000100 ffff88003b452000 ffff88003b452ff7 0000000100000009 [ 30.499713] raw: ffffea0000e243e0 ffffea0000ec0f20 ffff88006c7c3500 0000000000000000 [ 30.500264] page dumped because: kasan: bad access detected [ 30.500620] [ 30.500724] Memory state around the buggy address: [ 30.501068] ffff88003b452580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.501558] ffff88003b452600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.502085] >ffff88003b452680: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc [ 30.502562] ^ [ 30.502867] ffff88003b452700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.503411] ffff88003b452780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.503870] ================================================================== [ 30.504514] Kernel panic - not syncing: panic_on_warn set ... [ 30.504514] [ 30.505244] CPU: 3 PID: 5645 Comm: syz-executor5 Tainted: G B 4.13.0-rc5-next-20170817+ #5 [ 30.506177] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 30.506998] Call Trace: [ 30.507272] dump_stack+0x194/0x257 [ 30.507637] ? arch_local_irq_restore+0x53/0x53 [ 30.508102] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.508594] ? userfaultfd_release+0x580/0x6e0 [ 30.509067] panic+0x1e4/0x417 [ 30.509323] ? __warn+0x1d9/0x1d9 [ 30.509567] ? userfaultfd_release+0x5c1/0x6e0 [ 30.509920] kasan_end_report+0x50/0x50 [ 30.510248] kasan_report+0x137/0x340 [ 30.510545] ? userfaultfd_event_wait_completion+0x910/0x910 [ 30.510941] __asan_report_load8_noabort+0x14/0x20 [ 30.511312] userfaultfd_release+0x5c1/0x6e0 [ 30.511633] ? fcntl_setlk+0x10c0/0x10c0 [ 30.511933] ? kmem_cache_free+0x77/0x280 [ 30.512238] ? do_exit+0xa33/0x1b30 [ 30.512512] ? userfaultfd_event_wait_completion+0x910/0x910 [ 30.512918] ? fsnotify+0x1af0/0x1af0 [ 30.513216] ? rcu_note_context_switch+0x710/0x710 [ 30.513560] ? __might_sleep+0x95/0x190 [ 30.513855] ? userfaultfd_event_wait_completion+0x910/0x910 [ 30.514289] __fput+0x327/0x7e0 [ 30.514529] ? fput+0x140/0x140 [ 30.514787] ? do_raw_spin_trylock+0x190/0x190 [ 30.515581] ____fput+0x15/0x20 [ 30.515850] task_work_run+0x199/0x270 [ 30.516121] ? task_work_cancel+0x210/0x210 [ 30.516421] ? _raw_spin_unlock+0x22/0x30 [ 30.516712] ? switch_task_namespaces+0x87/0xc0 [ 30.517043] do_exit+0xa52/0x1b30 [ 30.517341] ? mm_update_next_owner+0x930/0x930 [ 30.517647] ? plist_check_head+0x130/0x130 [ 30.517962] ? do_raw_spin_trylock+0x190/0x190 [ 30.518334] ? schedule+0x108/0x440 [ 30.518580] ? lock_downgrade+0x990/0x990 [ 30.518841] ? __schedule+0x2070/0x2070 [ 30.519138] ? check_same_owner+0x320/0x320 [ 30.519427] ? rcu_note_context_switch+0x710/0x710 [ 30.519751] ? futex_wait_setup+0x14a/0x3d0 [ 30.520089] ? __might_sleep+0x95/0x190 [ 30.520383] ? _cond_resched+0x14/0x30 [ 30.520660] ? futex_wait_queue_me+0x524/0x7e0 [ 30.520963] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 30.521349] ? get_futex_value_locked+0xc3/0xf0 [ 30.521689] ? futex_wait_setup+0x22e/0x3d0 [ 30.521987] ? futex_wake+0x680/0x680 [ 30.522271] ? __dequeue_signal+0x103/0x7b0 [ 30.522578] ? recalc_sigpending_tsk+0x117/0x150 [ 30.522925] ? get_signal+0x855/0x17e0 [ 30.523240] ? lock_downgrade+0x990/0x990 [ 30.523538] do_group_exit+0x149/0x400 [ 30.523829] ? SyS_exit+0x30/0x30 [ 30.524082] ? wake_up_q+0x80/0xe0 [ 30.524354] get_signal+0x7e8/0x17e0 [ 30.524687] ? ptrace_notify+0x130/0x130 [ 30.524997] ? exit_robust_list+0x240/0x240 [ 30.525296] ? lock_acquire+0x1d5/0x580 [ 30.525575] ? __fget+0x333/0x570 [ 30.525814] do_signal+0x94/0x1ee0 [ 30.526099] ? lock_release+0xa40/0xa40 [ 30.526385] ? setup_sigcontext+0x7d0/0x7d0 [ 30.526693] ? lock_acquire+0x1d5/0x580 [ 30.526993] ? __fget+0x35c/0x570 [ 30.527226] ? trace_hardirqs_on+0xd/0x10 [ 30.527528] exit_to_usermode_loop+0x224/0x300 [ 30.527885] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 30.528245] ? fget_raw+0x20/0x20 [ 30.528544] syscall_return_slowpath+0x42f/0x500 [ 30.528885] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 30.529269] ? preempt_notifier_dec+0x20/0x20 [ 30.529576] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.529917] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 30.530253] RIP: 0033:0x446739 [ 30.530527] RSP: 002b:00007f17c7a76cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 30.531120] RAX: 0000000000000000 RBX: 0000000000708170 RCX: 0000000000446739 [ 30.531643] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708170 [ 30.532178] RBP: 0000000000708150 R08: 0000000000000000 R09: 0000000000000000 [ 30.532655] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 30.533170] R13: 0000000000000000 R14: 00007f17c7a779c0 R15: 00007f17c7a77700 [ 30.533786] Dumping ftrace buffer: [ 30.534058] (ftrace buffer empty) [ 30.534297] Kernel Offset: disabled [ 30.534536] Rebooting in 86400 seconds..