lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZpcnyYS29p/Fud+L@xpf.sh.intel.com>
Date: Wed, 17 Jul 2024 10:09:13 +0800
From: Pengfei Xu <pengfei.xu@...el.com>
To: Hillf Danton <hdanton@...a.com>
CC: syzbot <syzbot+4c882a4a0697c4a25364@...kaller.appspotmail.com>,
	<linux-kernel@...r.kernel.org>, <syzkaller-bugs@...glegroups.com>
Subject: Re: [syzbot] [crypto?] KASAN: slab-use-after-free Read in
 handle_mm_fault

On 2024-07-16 at 19:55:04 +0800, Hillf Danton wrote:
> On Tue, 16 Jul 2024 01:29:17 -0700
> > syzbot found the following issue on:
> > 
> > HEAD commit:    3fe121b62282 Add linux-next specific files for 20240712
> > git tree:       linux-next
> > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=13ce3259980000
> 
> #syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git  3fe121b62282
> 
> --- x/mm/memory.c
> +++ y/mm/memory.c
> @@ -5808,6 +5808,7 @@ vm_fault_t handle_mm_fault(struct vm_are
>  	/* If the fault handler drops the mmap_lock, vma may be freed */
>  	struct mm_struct *mm = vma->vm_mm;
>  	vm_fault_t ret;
> +	bool droppable;
>  
>  	__set_current_state(TASK_RUNNING);
>  
> @@ -5831,6 +5832,7 @@ vm_fault_t handle_mm_fault(struct vm_are
>  
>  	lru_gen_enter_fault(vma);
>  
> +	droppable = !!(vma->vm_flags & VM_DROPPABLE);
>  	if (unlikely(is_vm_hugetlb_page(vma)))
>  		ret = hugetlb_fault(vma->vm_mm, vma, address, flags);
>  	else
> @@ -5839,7 +5841,7 @@ vm_fault_t handle_mm_fault(struct vm_are
>  	lru_gen_exit_fault();
>  
>  	/* If the mapping is droppable, then errors due to OOM aren't fatal. */
> -	if (vma->vm_flags & VM_DROPPABLE)
> +	if (droppable)
>  		ret &= ~VM_FAULT_OOM;
>  
>  	if (flags & FAULT_FLAG_USER) {
> --

Should fix the following commit in next-20240715 tag kernel:
"
f73fad23fa mm: add MAP_DROPPABLE for designating always lazily freeable mappings
"

FYR.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ