mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+4e221abf50259362f4f4@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] KASAN: slab-use-after-free Read in mremap
Date: Sat, 16 Aug 2025 12:23:55 +0800	[thread overview]
Message-ID: <20250816042357.4704-1-hdanton@sina.com> (raw)
In-Reply-To: <689ff5f6.050a0220.e29e5.0030.GAE@google.com>

> Date: Fri, 15 Aug 2025 20:07:34 -0700	[thread overview]
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    931e46dcbc7e Add linux-next specific files for 20250814
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=16a66af0580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=bb7fbecfa2364d1c
> dashboard link: https://syzkaller.appspot.com/bug?extid=4e221abf50259362f4f4
> compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=11fb3c34580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=173c2dbc580000

#syz test

--- x/mm/mremap.c
+++ y/mm/mremap.c
@@ -1823,7 +1823,7 @@ static unsigned long remap_move(struct v
 	unsigned long target_addr = new_addr;
 	unsigned long res = -EFAULT;
 	unsigned long last_end;
-	bool seen_vma = false;
+	bool seen_vma = false, allowed;
 
 	VMA_ITERATOR(vmi, current->mm, start);
 
@@ -1865,7 +1865,8 @@ static unsigned long remap_move(struct v
 		vrm->new_addr = target_addr + offset;
 		vrm->old_len = vrm->new_len = len;
 
-		if (!vma_multi_allowed(vma)) {
+		allowed = vma_multi_allowed(vma);
+		if (!allowed) {
 			/* This is not the first VMA, abort immediately. */
 			if (seen_vma)
 				return -EFAULT;
@@ -1881,7 +1882,7 @@ static unsigned long remap_move(struct v
 			return res_vma;
 
 		if (!seen_vma) {
-			VM_WARN_ON_ONCE(vma_multi_allowed(vma) &&
+			VM_WARN_ON_ONCE(allowed &&
 					res_vma != new_addr);
 			res = res_vma;
 		}
--

  reply	other threads:[~2025-08-16  4:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-16  3:07 syzbot
2025-08-16  4:23 ` Hillf Danton [this message]
2025-08-16  5:18   ` syzbot
2025-08-16  7:32 ` Lorenzo Stoakes

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=20250816042357.4704-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+4e221abf50259362f4f4@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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®