[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_2749AC6EC9EEFD0CA1A7D706C792C0467906@qq.com>
Date: Tue, 5 Mar 2024 08:56:47 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+02e64be5307d72e9c309@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [fs?] KASAN: null-ptr-deref Write in do_pagemap_cmd
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:
Powered by blists - more mailing lists