CVE-2026-99351: sunrpc: treat empty auth.unix.gid replies as negative entries
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
sunrpc: treat empty auth.unix.gid replies as negative entries
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.
The Linux kernel CVE team has assigned CVE-2026-99351 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.21 with commit 3fc605a2aa38899c12180ca311f1eeb61a6d867e and fixed in 6.12.117 with commit 3a791bd9456839f8f13c4686b2287524a0a04141 Issue introduced in 2.6.21 with commit 3fc605a2aa38899c12180ca311f1eeb61a6d867e and fixed in 6.18.61 with commit 8067c654ae8c6d88aa0d499e9974b59ab2fe5042 Issue introduced in 2.6.21 with commit 3fc605a2aa38899c12180ca311f1eeb61a6d867e and fixed in 7.3.2 with commit 9d161fa805f49dd21d131065485065067bb96c8a Issue introduced in 2.6.21 with commit 3fc605a2aa38899c12180ca311f1eeb61a6d867e and fixed in 7.4-rc1 with commit a12cc0930235b86b934ade7c077a1935c2ac333d
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99351
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/sunrpc/svcauth_unix.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/3a791bd9456839f8f13c4686b2287524a0a04141 https://git.kernel.org/stable/c/8067c654ae8c6d88aa0d499e9974b59ab2fe5042 https://git.kernel.org/stable/c/9d161fa805f49dd21d131065485065067bb96c8a https://git.kernel.org/stable/c/a12cc0930235b86b934ade7c077a1935c2ac333d