CVE-2026-72219: lockd: Plug nlm_file leak when nlm_do_fopen() fails
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
lockd: Plug nlm_file leak when nlm_do_fopen() fails
A client can repeatedly drive nlm_do_fopen() failures by presenting file handles that the underlying export rejects. After kzalloc_obj() succeeds in nlm_lookup_file(), the freshly allocated nlm_file is not yet inserted into nlm_files[]. The nlm_do_fopen() failure path jumps to out_unlock, which releases nlm_file_mutex and returns without freeing the allocation, so each failure leaks one nlm_file.
Route the failure through out_free so kfree() runs before the function returns.
The Linux kernel CVE team has assigned CVE-2026-72219 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.10.220 with commit e580323ac0b51ad10ec2e181d1f777479b7983e7 and fixed in 5.10.261 with commit bca74fff138429f3d5802865f38fc883d53a4f1a Issue introduced in 5.15 with commit 7f024fcd5c97dc70bb9121c80407cf3cf9be7159 and fixed in 5.15.212 with commit d7c677feb3aa1f42b1026d75a8ea61338b51e4fb Issue introduced in 5.15 with commit 7f024fcd5c97dc70bb9121c80407cf3cf9be7159 and fixed in 6.1.178 with commit 39f59bf67231ed2eb0cdf6337194360e964b609a Issue introduced in 5.15 with commit 7f024fcd5c97dc70bb9121c80407cf3cf9be7159 and fixed in 6.6.145 with commit ddfbd816273b4e9c9b836f5b8773664c6f40f807 Issue introduced in 5.15 with commit 7f024fcd5c97dc70bb9121c80407cf3cf9be7159 and fixed in 6.12.97 with commit 1403f1221a35a6caf959bb7bf005741f17263c66 Issue introduced in 5.15 with commit 7f024fcd5c97dc70bb9121c80407cf3cf9be7159 and fixed in 6.18.40 with commit 1161c4b5bd0048c8148e919f818a33cff3623ef0 Issue introduced in 5.15 with commit 7f024fcd5c97dc70bb9121c80407cf3cf9be7159 and fixed in 7.1.5 with commit 3f2dc01b9cb516d4727a3b9263ee58c71ca00ba9 Issue introduced in 5.15 with commit 7f024fcd5c97dc70bb9121c80407cf3cf9be7159 and fixed in 7.2-rc1 with commit f16a1513452edb532fec81e591c64c320866719c
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-72219
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/lockd/svcsubs.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/bca74fff138429f3d5802865f38fc883d53a4f1a https://git.kernel.org/stable/c/d7c677feb3aa1f42b1026d75a8ea61338b51e4fb https://git.kernel.org/stable/c/39f59bf67231ed2eb0cdf6337194360e964b609a https://git.kernel.org/stable/c/ddfbd816273b4e9c9b836f5b8773664c6f40f807 https://git.kernel.org/stable/c/1403f1221a35a6caf959bb7bf005741f17263c66 https://git.kernel.org/stable/c/1161c4b5bd0048c8148e919f818a33cff3623ef0 https://git.kernel.org/stable/c/3f2dc01b9cb516d4727a3b9263ee58c71ca00ba9 https://git.kernel.org/stable/c/f16a1513452edb532fec81e591c64c320866719c