CVE-2026-53399
Received Received - Intake

Memory Leak in Linux Kernel NFS Server

Vulnerability report for CVE-2026-53399, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-19

Last updated on: 2026-07-19

Assigner: kernel.org

Description

In the Linux kernel, the following vulnerability has been resolved: nfsd: release layout stid on setlease failure nfs4_alloc_stid() publishes the new stid into cl->cl_stateids via idr_alloc_cyclic() under cl_lock before returning to nfsd4_alloc_layout_stateid(). When nfsd4_layout_setlease() then fails, the error path frees the layout stateid directly with kmem_cache_free() 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 nfs4_put_stid(), which removes the IDR slot under cl_lock, dispatches sc_free (nfsd4_free_layout_stateid) to release ls->ls_file via nfsd4_close_layout(), and drops the nfs4_file reference in its tail. A second issue blocks that switch: nfsd4_free_layout_stateid() unconditionally inspects ls->ls_fence_work via delayed_work_pending() under ls_lock, but INIT_DELAYED_WORK(&ls->ls_fence_work, ...) currently runs only after the setlease call. On the setlease-failure path the destructor would touch an uninitialized delayed_work. nfsd4_alloc_layout_stateid() nfs4_alloc_stid() /* idr_alloc_cyclic under cl_lock */ nfsd4_layout_setlease() /* fails */ nfs4_put_stid() nfsd4_free_layout_stateid() delayed_work_pending(&ls->ls_fence_work) /* needs INIT */ nfsd4_close_layout() /* nfsd_file_put(ls->ls_file) */ put_nfs4_file() Fix by hoisting the ls_fenced / ls_fence_delay / INIT_DELAYED_WORK initialization above the nfsd4_layout_setlease() call, and replace the manual nfsd_file_put + put_nfs4_file + kmem_cache_free cleanup with a single nfs4_put_stid(stp).

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-19
Last Modified
2026-07-19
Generated
2026-07-20
AI Q&A
2026-07-19
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in the Linux kernel involves improper handling of layout state IDs in the NFS server. When a lease setup fails, the system incorrectly frees memory without cleaning up references, leaving dangling pointers in the IDR (ID management system). This can cause crashes or memory corruption when other parts of the kernel try to access the freed memory.

Detection Guidance

This vulnerability is specific to the Linux kernel's NFS server implementation and requires kernel-level inspection. Detection involves checking kernel logs for NFS-related errors or crashes, particularly during lease setup failures. Commands like dmesg | grep -i nfs or journalctl -k | grep -i nfs may reveal related errors. However, no direct detection commands are provided in the context.

Impact Analysis

If exploited, this flaw could lead to system crashes, data corruption, or privilege escalation on systems running vulnerable NFS server software. Attackers might trigger the issue by sending malformed requests to the NFS server, potentially disrupting services or gaining unauthorized access.

Compliance Impact

This vulnerability is specific to the Linux kernel's NFS (Network File System) implementation and involves memory management issues during stateid allocation and lease setup. It does not directly relate to data privacy, access controls, or audit logging requirements typically addressed by GDPR or HIPAA. Compliance impact would depend on whether affected systems are used in environments subject to these regulations, but the vulnerability itself does not inherently violate GDPR or HIPAA standards.

Mitigation Strategies

Apply the kernel patch that fixes this issue by updating to a version containing the fix. The patch involves initializing delayed work structures before lease setup and using nfs4_put_stid() for proper cleanup. Monitor kernel security advisories for updates.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-53399. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart