Re: [PATCH] fhandle: fix UAF due to unlocked ->mnt_ns read in may_decode_fh()
From: Al Viro
Date: Wed Jun 03 2026 - 15:29:20 EST
On Wed, Jun 03, 2026 at 09:08:26PM +0200, Jann Horn wrote:
> (And there's also that weird detail of how, for anonymous namespaces,
> the active refcount isn't used and AFAICS never actually drops to
> zero...)
More like "is always 1 and we skip decrement when we decide to drop
that", really.
> So I guess I'll write "Containing namespace (active or deactivating,
> non-refcounted)."?
That would probably do for now... The lifecycle for mnt_namespace
really needs to be documented; right now we have a maze of twisty
little functions around that area and it takes quite a non-trivial
amount of searching to recall the names - and I am familiar with
the area ;-/