mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+ebfd0e44b5c11034e1eb@syzkaller.appspotmail.com>
Cc: Liam.Howlett@oracle.com, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	lorenzo.stoakes@oracle.com, syzkaller-bugs@googlegroups.com,
	vbabka@suse.cz
Subject: Re: [syzbot] [mm?] KASAN: slab-use-after-free Read in mas_next_slot (2)
Date: Thu, 17 Jul 2025 09:46:21 +0800	[thread overview]
Message-ID: <20250717014623.2253-1-hdanton@sina.com> (raw)
In-Reply-To: <6877e797.a00a0220.3af5df.0012.GAE@google.com>

> Date: Wed, 16 Jul 2025 10:55:35 -0700
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    0be23810e32e Add linux-next specific files for 20250714
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=11a9a7d4580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=adc3ea2bfe31343b
> dashboard link: https://syzkaller.appspot.com/bug?extid=ebfd0e44b5c11034e1eb
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=11d0658c580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=15dd858c580000

Test Lorenzo's patch

#syz test

--- x/mm/mremap.c
+++ y/mm/mremap.c
@@ -1112,6 +1112,7 @@ static void unmap_source_vma(struct vma_
 
 	err = do_vmi_munmap(&vmi, mm, addr, len, vrm->uf_unmap, /* unlock= */false);
 	vrm->vma = NULL; /* Invalidated. */
+	vrm->vmi_needs_reset = true;
 	if (err) {
 		/* OOM: unable to split vma, just get accounts right */
 		vm_acct_memory(len >> PAGE_SHIFT);
@@ -1367,6 +1368,7 @@ static unsigned long mremap_to(struct vm
 		err = do_munmap(mm, vrm->new_addr, vrm->new_len,
 				vrm->uf_unmap_early);
 		vrm->vma = NULL; /* Invalidated. */
+		vrm->vmi_needs_reset = true;
 		if (err)
 			return err;
 
--

  parent reply	other threads:[~2025-07-17  1:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16 17:55 syzbot
2025-07-16 18:27 ` Lorenzo Stoakes
2025-07-16 18:32   ` Lorenzo Stoakes
2025-07-16 19:04 ` Lorenzo Stoakes
2025-07-16 19:38   ` Lorenzo Stoakes
2025-07-16 19:11 ` syzbot
2025-07-17  1:46 ` Hillf Danton [this message]
2025-07-17  3:55   ` syzbot
2025-07-17  4:18     ` Lorenzo Stoakes
2025-07-17 16:06       ` Lorenzo Stoakes
2025-07-17 23:42         ` Hillf Danton
2025-07-18 11:08           ` Lorenzo Stoakes
2025-07-18 12:56             ` Hillf Danton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250717014623.2253-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=syzbot+ebfd0e44b5c11034e1eb@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®