[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240716115504.1136-1-hdanton@sina.com>
Date: Tue, 16 Jul 2024 19:55:04 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+4c882a4a0697c4a25364@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [crypto?] KASAN: slab-use-after-free Read in handle_mm_fault
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) {
--
Powered by blists - more mailing lists