CVE-2026-99365: nfsd: Fix id-to-name cache entry leak in idtoname_parse()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
nfsd: Fix id-to-name cache entry leak in idtoname_parse()
idtoname_lookup() returns the id-to-name cache entry with a new reference. The name is parsed between the lookup and the update call, and when the parsed name is malformed (negative length or longer than IDMAP_NAMESZ), idtoname_parse() jumps to the error label without dropping the reference returned by idtoname_lookup(), leaking the cache entry.
Release the reference with cache_put() before taking the error exit.
The Linux kernel CVE team has assigned CVE-2026-99365 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.17 with commit f9ecc921b5b5e135050e7f22fef873c249aee3fc and fixed in 6.12.117 with commit c480c7bea087d923f97a0fd88e51943c3a9cb407 Issue introduced in 2.6.17 with commit f9ecc921b5b5e135050e7f22fef873c249aee3fc and fixed in 6.18.61 with commit e48996466d78606890613a950fcddbdaa8fd41e8 Issue introduced in 2.6.17 with commit f9ecc921b5b5e135050e7f22fef873c249aee3fc and fixed in 7.3.2 with commit 24a2a428cb2a95cabdeccd98912b41bc13907065 Issue introduced in 2.6.17 with commit f9ecc921b5b5e135050e7f22fef873c249aee3fc and fixed in 7.4-rc1 with commit 8ca3b74c0c447af17d0e27e76658a3d4cae3c5ba
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-99365
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:
fs/nfsd/nfs4idmap.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/c480c7bea087d923f97a0fd88e51943c3a9cb407 https://git.kernel.org/stable/c/e48996466d78606890613a950fcddbdaa8fd41e8 https://git.kernel.org/stable/c/24a2a428cb2a95cabdeccd98912b41bc13907065 https://git.kernel.org/stable/c/8ca3b74c0c447af17d0e27e76658a3d4cae3c5ba