Linux filesystem development
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Vineet Agarwal <agarwal.vineet2006@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	Jori Koolstra <jkoolstra@xs4all.nl>,
	 jack@suse.cz, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	 syzbot <syzbot@syzkaller.appspotmail.com>
Subject: Re: [PATCH] fs/namespace: fix NULL pointer dereference in do_lock_mount()
Date: Mon, 11 May 2026 14:58:22 +0200	[thread overview]
Message-ID: <20260511-kommt-genug-c36a3c144bf4@brauner> (raw)
In-Reply-To: <CA+rjy8fdpT7arFGcA3Z9ev41AtDxoLfhu3wYBv5VL=7bqUFUYw@mail.gmail.com>

On Wed, May 06, 2026 at 10:07:29AM +0530, Vineet Agarwal wrote:
> Hi,
> 
> Thanks for the follow-up.
> 
> I don’t have a stable reproducer yet; the issue is triggered by syzkaller
> under fuzzing on a local build (7.1.0-rc1 with KASAN enabled).
> 
> However, I was able to capture consistent KASAN reports. The issue is not
> limited to a NULL dereference — I am also observing slab-use-after-free
> in do_lock_mount().
> 
> >From the reports, the accessed object belongs to mnt_cache, and is freed
> via mntput_no_expire_slowpath() from a concurrent umount path, while
> do_lock_mount() is still using the mount returned by where_to_mount().
> 
> The stack traces consistently follow this pattern:
> 
> do_lock_mount()
> → where_to_mount()
> → do_move_mount()
> → __do_sys_move_mount()
> 
> with the freeing happening via:
> 
> mntput_no_expire_slowpath()
> → path_umount()
> → __x64_sys_umount()
> 
> This seems consistent with a race between move_mount and umount, where
> the mount object returned by where_to_mount() is no longer valid after
> dropping mount_locked_reader.
> 
> I agree that my earlier explanation focusing on dentry state was not
> accurate. The issue appears to be related to mount lifetime rather than
> dentry revalidation.
> 
> Below is one of the stack traces:
> 
> ==================================================================
> BUG: KASAN: slab-use-after-free in topmost_overmount fs/mount.h:239 [inline]
> BUG: KASAN: slab-use-after-free in where_to_mount fs/namespace.c:2695
> [inline]
> BUG: KASAN: slab-use-after-free in where_to_mount fs/namespace.c:2688
> [inline]
> BUG: KASAN: slab-use-after-free in do_lock_mount.part.0+0xa1b/0xbf0
> fs/namespace.c:2756
> 
> Call Trace:
>  <TASK>
>  topmost_overmount fs/mount.h:239 [inline]
>  where_to_mount fs/namespace.c:2695 [inline]
>  where_to_mount fs/namespace.c:2688 [inline]
>  do_lock_mount.part.0+0xa1b/0xbf0 fs/namespace.c:2756
>  do_lock_mount fs/namespace.c:2751 [inline]
>  do_move_mount.isra.0+0x1ac/0xce0 fs/namespace.c:3645
>  vfs_move_mount fs/namespace.c:4561 [inline]
>  __do_sys_move_mount+0x62e/0x770 fs/namespace.c:4629
>  do_syscall_64+0xe0/0x5a0 arch/x86/entry/syscall_64.c:94
>  entry_SYSCALL_64_after_hwframe+0x77/0x7f
>  </TASK>
> 
> Allocated by task:
>  alloc_vfsmnt fs/namespace.c:287
>  vfs_create_mount fs/namespace.c:1171
>  fc_mount fs/namespace.c:1191
>  do_new_mount fs/namespace.c:3840
>  path_mount fs/namespace.c:4160
>  __x64_sys_mount fs/namespace.c:4366
> 
> Freed by task:

Nothing in here makes sense imho and the details you provide are fuzzy
at best and I see a bunch of patches that got rejected already. The
stacktraces here look rather sketchy and I'm not sure 

This doesn't free anything. This just schedules task work and KASAN
would always show the actual release/free paths. So this looks forged or
tampered with.

Provide all the details. Unless it is of the same quality and clarify as
syzbot I'm inclined to call this hallucinated or based on some old
kernel.

      reply	other threads:[~2026-05-11 12:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  9:51 [PATCH] fs/namespace: fix NULL pointer dereference in do_lock_mount() Vineet Agarwal
2026-05-05 14:43 ` Jori Koolstra
     [not found]   ` <CA+rjy8fM+8ahj7dcBWjnACU8xBWBqW4ssQFpi68dqRc-F-V3Xg@mail.gmail.com>
2026-05-06  2:12     ` Al Viro
2026-05-06  2:21       ` Al Viro
2026-05-06  4:37         ` Vineet Agarwal
2026-05-11 12:58           ` Christian Brauner [this message]

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=20260511-kommt-genug-c36a3c144bf4@brauner \
    --to=brauner@kernel.org \
    --cc=agarwal.vineet2006@gmail.com \
    --cc=jack@suse.cz \
    --cc=jkoolstra@xs4all.nl \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot@syzkaller.appspotmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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