From: "Chuck Lever" <cel@kernel.org>
To: "Ameer Hamza" <ameer.hamza@truenas.com>,
"Jeff Layton" <jlayton@kernel.org>, NeilBrown <neil@brown.name>,
"Olga Kornievskaia" <okorniev@redhat.com>,
"Dai Ngo" <Dai.Ngo@oracle.com>, "Tom Talpey" <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
alexander.motin@truenas.com, caleb.stjohn@truenas.com
Subject: Re: [PATCH] sunrpc: treat empty auth.unix.gid replies as negative entries
Date: Fri, 14 Aug 2026 16:02:23 -0400 [thread overview]
Message-ID: <032eae35-e958-4c87-9185-3896250eb7e1@app.fastmail.com> (raw)
In-Reply-To: <20260814172507.1474519-1-ameer.hamza@truenas.com>
On Fri, Aug 14, 2026, at 1:25 PM, Ameer Hamza wrote:
> When rpc.mountd cannot resolve a uid (getpwuid() or getgrouplist()
> failure, e.g. while winbind or sssd is briefly unreachable), it
> answers the auth.unix.gid upcall with zero groups. unix_gid_parse()
> installs that as a valid positive entry, and svcauth_unix_set_client()
> then replaces the credential's group list with the empty one on
> every request, RPCSEC_GSS included via svcauth_gss_set_client().
> One failed lookup strips that uid of all supplementary groups on
> every export for up to mountd's configured TTL (30 minutes by
> default), long after the NSS backend has recovered.
>
> mountd cannot send an empty list for a successful lookup, since
> getgrouplist(3) always includes at least the user's primary group,
> so a zero-group reply can only mean the lookup failed. Record it as
> a negative entry: unix_gid_find() then returns -ENOENT and
> svcauth_unix_set_client() keeps the groups the RPC credential
> already carries. This is the fallback that
> commit 3fc605a2aa38 ("[PATCH] knfsd: allow the server to provide a
> gid list when using AUTH_UNIX authentication") promised when no
> answer is available, and the same state try_to_negate_entry()
> already creates when no listener holds the channel open.
>
> Fixes: 3fc605a2aa38 ("[PATCH] knfsd: allow the server to provide a gid
> list when using AUTH_UNIX authentication")
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Ameer Hamza <ameer.hamza@truenas.com>
Looks like the same bug exists for the new mountd netlink
mechanism. Since that instance of the bug arrived in a
different commit, that fix needs to be a separate patch
with its own Fixes: tag.
Can you make this a two-patch series?
--
Chuck Lever
next prev parent reply other threads:[~2026-08-14 20:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 17:25 Ameer Hamza
2026-08-14 20:02 ` Chuck Lever [this message]
2026-08-14 20:34 ` Ameer Hamza
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=032eae35-e958-4c87-9185-3896250eb7e1@app.fastmail.com \
--to=cel@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=alexander.motin@truenas.com \
--cc=ameer.hamza@truenas.com \
--cc=caleb.stjohn@truenas.com \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
/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
all inboxes | Powered by JetHome®