CVE-2026-53399: nfsd: release layout stid on setlease failure
In the Linux kernel, the following vulnerability has been resolved:
nfsd: release layout stid on setlease failure
nfs4allocstid() publishes the new stid into cl->clstateids via idralloccyclic() under cllock before returning to nfsd4alloclayoutstateid(). When nfsd4layoutsetlease() then fails, the error path frees the layout stateid directly with kmemcachefree() without ever calling idrremove(), leaving the IDR slot pointing at freed slab memory. Any subsequent IDR walker (statesshow, client teardown) dereferences the dangling pointer.
The correct teardown for an IDR-published stid is nfs4putstid(), which removes the IDR slot under cllock, dispatches scfree (nfsd4freelayoutstateid) to release ls->lsfile via nfsd4closelayout(), and drops the nfs4file reference in its tail.
A second issue blocks that switch: nfsd4freelayoutstateid() unconditionally inspects ls->lsfencework via delayedworkpending() under lslock, but INITDELAYEDWORK(&ls->lsfencework, ...) currently runs only after the setlease call. On the setlease-failure path the destructor would touch an uninitialized delayedwork.
nfsd4alloclayoutstateid() nfs4allocstid() / idralloccyclic under cllock / nfsd4layoutsetlease() / fails / nfs4putstid() nfsd4freelayoutstateid() delayedworkpending(&ls->lsfencework) / needs INIT / nfsd4closelayout() / nfsdfileput(ls->lsfile) / putnfs4file()
Fix by hoisting the lsfenced / lsfencedelay / INITDELAYEDWORK initialization above the nfsd4layoutsetlease() call, and replace the manual nfsdfileput + putnfs4file + kmemcachefree cleanup with a single nfs4putstid(stp).
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.145.2-1
Event History
Frequently Asked Questions
What is the severity of CVE-2026-53399?
CVE-2026-53399 has a severity rating of critical with a CVSS score of 9.8.
How do I fix CVE-2026-53399?
To fix CVE-2026-53399, update to the latest version of the Linux kernel where the vulnerability has been addressed.
What systems are affected by CVE-2026-53399?
CVE-2026-53399 affects systems running the vulnerable versions of the Linux kernel.
What impact does CVE-2026-53399 have on security?
CVE-2026-53399 can lead to unauthorized data access and modification due to the release layout stid on setlease failure.
When was CVE-2026-53399 published?
CVE-2026-53399 was published on July 19, 2026.