From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+02e64be5307d72e9c309@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [fs?] KASAN: null-ptr-deref Write in do_pagemap_cmd
Date: Tue, 5 Mar 2024 08:56:47 +0800 [thread overview]
Message-ID: <tencent_2749AC6EC9EEFD0CA1A7D706C792C0467906@qq.com> (raw)
In-Reply-To: <0000000000001bc4a00612d9a7f4@google.com>
please test null ptr deref in do_pagemap_cmd
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 3f78ebbb795f..ab28666956d0 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -2510,6 +2510,8 @@ static long do_pagemap_cmd(struct file *file, unsigned int cmd,
switch (cmd) {
case PAGEMAP_SCAN:
+ if (!mm)
+ return -EINVAL;
return do_pagemap_scan(mm, arg);
default:
next prev parent reply other threads:[~2024-03-05 0:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 18:11 syzbot
2024-03-05 0:56 ` Edward Adam Davis [this message]
2024-03-05 3:28 ` syzbot
2024-03-05 11:38 ` [PATCH] mm/pagemap: fix null ptr deref " Edward Adam Davis
2025-06-25 23:23 ` [syzbot] [fs?] KASAN: null-ptr-deref Write " syzbot
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=tencent_2749AC6EC9EEFD0CA1A7D706C792C0467906@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+02e64be5307d72e9c309@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®