Re: [PATCH v2] fhandle: fix UAF due to unlocked ->mnt_ns read in may_decode_fh()
From: Christian Brauner
Date: Thu Jun 04 2026 - 03:42:47 EST
On Wed, 03 Jun 2026 21:31:57 +0200, Jann Horn wrote:
> may_decode_fh() accesses mount::mnt_ns without holding any locks; that
> means the mount can concurrently be unmounted, and the mnt_namespace can
> concurrently be freed after an RCU grace period.
>
> This race can happens as follows, assuming that the mount point was
> created by open_tree(..., OPEN_TREE_CLONE):
>
> [...]
Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes
[1/1] fhandle: fix UAF due to unlocked ->mnt_ns read in may_decode_fh()
https://git.kernel.org/vfs/vfs/c/40ab6644b996