Re: [syzbot] [mm?] KASAN: slab-use-after-free Read in __vma_reservation_common

From: Hillf Danton
Date: Sat Apr 13 2024 - 23:31:41 EST


On Sat, 13 Apr 2024 11:34:32 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 9ed46da14b9b Add linux-next specific files for 20240412
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=12bd4457180000
> kernel config: https://syzkaller.appspot.com/x/.config?x=7ea0abc478c49859
> dashboard link: https://syzkaller.appspot.com/bug?extid=ad1b592fc4483655438b
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1370ea67180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 9ed46da14b9b

--- x/arch/x86/mm/fault.c
+++ y/arch/x86/mm/fault.c
@@ -1353,8 +1353,7 @@ void do_user_addr_fault(struct pt_regs *
}
#endif

- if (!(flags & FAULT_FLAG_USER))
- goto lock_mmap;
+ goto lock_mmap;

vma = lock_vma_under_rcu(mm, address);
if (!vma)
--