Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-53399

nfsd: release layout stid on setlease failure
Back to all
CVE

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->cl_stateids via

idralloccyclic() under cl_lock before returning to

nfsd4alloclayoutstateid(). When nfsd4layout_setlease() then

fails, the error path frees the layout stateid directly with

kmemcachefree() without ever calling idr_remove(), leaving the

IDR slot pointing at freed slab memory. Any subsequent IDR walker

(states_show, 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 nfs4_file reference in its

tail.

A second issue blocks that switch: nfsd4freelayout_stateid()

unconditionally inspects ls->lsfencework via

delayedworkpending() under ls_lock, but

INITDELAYEDWORK(&ls->lsfencework, ...) currently runs only

after the setlease call. On the setlease-failure path the

destructor would touch an uninitialized delayed_work.

    nfsd4alloclayout_stateid()

      nfs4allocstid()           / idralloccyclic under cl_lock /

      nfsd4layoutsetlease()     / fails /

        nfs4putstid()

          nfsd4freelayout_stateid()

            delayedworkpending(&ls->lsfencework)  / needs INIT /

            nfsd4closelayout()  / nfsdfileput(ls->ls_file) /

          putnfs4file()

Fix by hoisting the lsfenced / lsfencedelay / INITDELAYED_WORK

initialization above the nfsd4layoutsetlease() call, and replace

the manual nfsdfileput + putnfs4file + kmemcachefree cleanup

with a single nfs4putstid(stp).

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.8
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
-

Related Resources

No items found.

References

https://git.kernel.org/stable/c/2e0a5d6d62600b8c614d1b55e50ef94035d6adf9, https://git.kernel.org/stable/c/30d55c8aabb261bc3f427d6b9aae7ef6206063f9, https://git.kernel.org/stable/c/48a586e382e4db1dbf958d44b63e081df5f8ed04, https://git.kernel.org/stable/c/7bbb7ce74051c8be4b69ff44ce3db370600dae61, https://git.kernel.org/stable/c/83c2b7797742339bb768f83935f7ca33950db138, https://git.kernel.org/stable/c/8dee7c278f1c2b5bb80e17a6281c3812fc8b0cdd, https://git.kernel.org/stable/c/d369e5edfaaf83a448016e2f1da392b2174be801, https://git.kernel.org/stable/c/d788ef40a7517d22c97ab01700e4ae4c611b6f2f, https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53399.json, https://nvd.nist.gov/vuln/detail/CVE-2026-53399, https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Severity

9.8

CVSS Score
0
10

Basic Information

Base CVSS
9.8
EPSS Probability
0.00543%
EPSS Percentile
0.43436%
Introduced Version
c5c707f96fc9a6e5a57ca5baac892673270abe3d,4.0.0,5.11.0,5.16.0,6.2.0,6.7.0,6.13.0,6.19.0,0
Fix Available
30d55c8aabb261bc3f427d6b9aae7ef6206063f9,5.10.261,5.15.212,6.1.178,6.6.145,6.12.96,6.18.39,7.1.3,0:4.18.0-553.159.1.rt7.500.el8_10,0:4.18.0-553.159.1.el8_10,6.1.180-1,6.12.100-1~deb12u1,6.12.96-1,0:5.15.0-324.217.5.2.el8uek,0:5.15.0-324.217.5.2.el9uek,0:6.12.0-206.104.3.3.el9uek,0:6.12.0-206.104.3.3.el10uek,0:6.12.0-211.50.1.el10_2,0:5.10.262-262.1063.amzn2,0:1.0-0.amzn2,6.18.42-r0,6.12.101-r0,6.18.44-r0,6.18.41-r0,6.12.100-r0

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading