[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3d007161-f0d8-43cf-a0c4-5d62cd38da07@kadam.mountain>
Date: Tue, 17 Oct 2023 17:15:23 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Lorenzo Stoakes <lstoakes@...il.com>
Cc: Naresh Kamboju <naresh.kamboju@...aro.org>,
open list <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>, lkft-triage@...ts.linaro.org,
"Reviewed-by: Jan Kara" <jack@...e.cz>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andy Lutomirski <luto@...nel.org>,
Christian Brauner <brauner@...nel.org>,
Hugh Dickins <hughd@...gle.com>, willy@...radead.org,
Mike Kravetz <mike.kravetz@...cle.com>,
Muchun Song <muchun.song@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: mm: Unable to handle kernel NULL pointer dereference at virtual
address - mmap_region (include/linux/fs.h:580 mm/mmap.c:2946)
On Mon, Oct 16, 2023 at 05:32:00PM +0100, Lorenzo Stoakes wrote:
> On Mon, Oct 16, 2023 at 12:05:37PM +0100, Lorenzo Stoakes wrote:
> > On Mon, Oct 16, 2023 at 03:52:07PM +0530, Naresh Kamboju wrote:
> > > Following kernel crash noticed while running LTP hugetlb and selftests on
> > > qemu-x86_64 and qemu-arm64 running with Linux next 6.6.0-rc6-next-20231016.
> > >
> > > Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> > > Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
> > >
> > > Test Logs:
> > > -----
> >
> > [snip]
> >
> > > <4>[ 97.499871] Call trace:
> > > <4>[ 97.500288] mmap_region (include/linux/fs.h:580 mm/mmap.c:2946)
> >
> > OK this is from a patch of mine, and an easy fix (incorrect assumption about
> > vm->vm_file == file).
> >
> > I will put a fix forward tonight.
> >
> > > <4>[ 97.500814] do_mmap (mm/mmap.c:1379)
> > > <4>[ 97.501243] vm_mmap_pgoff (mm/util.c:546)
> > > <4>[ 97.501711] ksys_mmap_pgoff (mm/mmap.c:1425)
> > > <4>[ 97.502166] __arm64_sys_mmap (arch/arm64/kernel/sys.c:21)
> > > <4>[ 97.502634] invoke_syscall (arch/arm64/include/asm/current.h:19
> > > arch/arm64/kernel/syscall.c:56)
> > > <4>[ 97.503175] el0_svc_common.constprop.0
> > > (include/linux/thread_info.h:127 (discriminator 2)
> > > arch/arm64/kernel/syscall.c:144 (discriminator 2))
> > > <4>[ 97.503763] do_el0_svc (arch/arm64/kernel/syscall.c:156)
> > > <4>[ 97.504191] el0_svc (arch/arm64/include/asm/daifflags.h:28
> > > arch/arm64/kernel/entry-common.c:133
> > > arch/arm64/kernel/entry-common.c:144
> > > arch/arm64/kernel/entry-common.c:679)
> >
> > [snip]
>
> Have cc-d people in this thread on it, but for the record, -fix patch is at
> https://lore.kernel.org/all/c9eb4cc6-7db4-4c2b-838d-43a0b319a4f0@lucifer.local/
Smatch also caught this bug. Your patch silences the warning.
mm/mmap.c:2946 mmap_region() error: we previously assumed 'file' could be null (see line 2849)
It's amazing that Naresh was able to hit this after it had only been in
linux-next for less than a day.
regards,
dan carpenter
Powered by blists - more mailing lists