MEDIUM 5.5

CVE-2026-52996: Linux Kernel ksmbd Durable Handle Reference Leak

A resource leak vulnerability exists in the Linux kernel's SMB server implementation (ksmbd). When a client attempts to reconnect to a file using durable handle version 2, the server may fail to properly release a reference to a file descriptor if the client's identifier doesn't match what's stored on the server. This causes server memory and file table entries to accumulate over time, potentially degrading performance or causing denial of service as the system exhausts resources.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-401
Affected products
1 configuration(s)
Published / Modified
2026-06-24 / 2026-07-15

NVD description (verbatim)

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix durable fd leak on ClientGUID mismatch in durable v2 open ksmbd_lookup_fd_cguid() returns a ksmbd_file with its refcount incremented via ksmbd_fp_get(). parse_durable_handle_context() in the DURABLE_REQ_V2 case properly releases this reference on every path inside the ClientGUID-match branch, either by calling ksmbd_put_durable_fd() or by transferring ownership to dh_info->fp for a successful reconnect. However, when an entry exists in the global file table with the same CreateGuid but a different ClientGUID, the code simply falls through to the new-open path without dropping the reference obtained from ksmbd_lookup_fd_cguid(). Per MS-SMB2 section 3.3.5.9.10 ("Handling the SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 Create Context"), the server MUST locate an Open whose Open.CreateGuid matches the request's CreateGuid AND whose Open.ClientGuid matches the ClientGuid of the connection that received the request. If no such Open is found, the server MUST continue with the normal open execution phase. A CreateGuid hit with a ClientGUID mismatch is therefore the "Open not found" case: proceeding with a new open is correct, but the reference obtained purely as a side effect of the lookup must not be leaked. Repeated requests that hit this mismatch pin global_ft entries, prevent __ksmbd_close_fd() from ever running for the corresponding files, and defeat the durable scavenger, leading to long-lived resource leaks. Release the reference in the mismatch path and clear dh_info->fp so subsequent logic does not mistake a non-matching lookup result for a reconnect target.

5 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-52996 is a reference-counting bug in ksmbd's durable handle v2 reconnect logic. The function ksmbd_lookup_fd_cguid() increments a reference count on a file descriptor when searching for a matching CreateGuid in the global file table. In the DURABLE_REQ_V2 code path, when the CreateGuid matches but the ClientGUID does not—a legitimate "Open not found" scenario per MS-SMB2 3.3.5.9.10—the code falls through to normal open handling without releasing the acquired reference. Repeated mismatches pin entries in the global file table, preventing the durable file scavenger from reclaiming them and causing resource exhaustion. The fix requires releasing the reference and clearing dh_info->fp in the mismatch path.

Business impact

Resource exhaustion on file servers running vulnerable kernel versions. Over time, repeated durable reconnect attempts with ClientGUID mismatches accumulate pinned file descriptors, consuming kernel memory and blocking the scavenger mechanism. On production SMB servers handling many client connections, this can lead to service degradation, file table saturation, or denial of service. Organizations relying on durable handle semantics for session recovery are at risk if clients are misconfigured or if workloads involve frequent reconnection attempts.

Affected systems

This vulnerability affects Linux kernel versions containing the vulnerable ksmbd code path. Ksmbd is the kernel SMB server component used by distributions that expose SMB/CIFS services directly from the kernel (common in NAS appliances, clustered storage, and containerized environments). Check your distribution's kernel version against available patches; the vulnerability impacts any kernel before the fix is applied. Affected systems are primarily those running kernel versions that include ksmbd with the unpatched durable handle v2 logic.

Exploitability

Exploitability requires network-level access to the SMB service and the ability to initiate durable handle v2 reconnections with a valid CreateGuid but mismatched ClientGUID. This is a local-adjacent attack (AV:L per CVSS) that does not require elevated privileges—a local or authenticated remote user can trigger the leak by repeatedly attempting reconnections. No user interaction is needed. The attack is reliable and repeatable, though the impact is cumulative rather than immediate, making it suitable for slow resource-exhaustion campaigns.

Remediation

Update to a patched Linux kernel version that includes the fix for CVE-2026-52996. The patch adds proper reference release and clears dh_info->fp in the ClientGUID mismatch path. Verify the specific kernel version from your vendor or the Linux kernel security advisories. As an interim mitigation, if feasible, restrict SMB access to trusted networks or rate-limit durable reconnection attempts to slow resource accumulation.

Patch guidance

Check your Linux distribution's security advisory and kernel update repository for a kernel version published on or after 2026-07-15 that resolves CVE-2026-52996. Apply the kernel update and reboot. Verify that ksmbd is enabled in your kernel configuration (CONFIG_SMB_SERVER); systems without ksmbd are unaffected. After patching, monitor file table and memory usage to confirm that durable handle processing no longer leaks references.

Detection guidance

Monitor kernel log messages and /proc/sys/fs/file-nr for signs of file descriptor exhaustion or warnings from the durable scavenger. Track SMB server reconnection failures that correspond to ClientGUID mismatches. Watch for increasing file table pressure (high "allocated" count in /proc/fs/nfs/nfsfs) if using ksmbd. Correlate SMB client reconnection attempts with resource pressure. Enable ksmbd debug logging if available in your distribution to capture durable handle mismatch events.

Why prioritize this

This is a medium-severity denial-of-service vector affecting kernel resource management. While not remotely exploitable from the network perimeter (AV:L), it can be triggered by any authenticated SMB client or local user with network access to the SMB service. The cumulative nature of the leak makes it suitable for sustained DoS attacks. Organizations running kernel-level SMB servers (ksmbd) should prioritize patching to prevent resource exhaustion, especially in multi-tenant or high-connection-count environments.

Risk score, explained

CVSS 5.5 (MEDIUM) reflects high availability impact (A:H) with low attack complexity and no special privileges required, offset by local attack vector and no direct confidentiality or integrity exposure. The severity is justified by the denial-of-service potential through resource exhaustion rather than data breach or privilege escalation risk. In high-traffic SMB environments, the practical impact may be higher due to accelerated resource depletion.

Frequently asked questions

Who is affected by this vulnerability?

Linux systems running ksmbd (kernel SMB server) are affected. This includes NAS appliances, some Linux distributions with kernel SMB support enabled, containerized storage solutions, and clustered file servers. Systems not using ksmbd, or running patched kernel versions, are not affected. Check your kernel configuration and version against available advisories.

Can this be exploited remotely over the network?

The vulnerability requires SMB network access and the ability to send durable handle v2 reconnection requests. While the CVSS vector specifies local attack vector (AV:L), in practice any authenticated SMB client or user on the same network segment can trigger the leak. It is not exploitable from the general internet without SMB access; however, internal networks and cloud environments with SMB services exposed may face practical risk.

What happens if I don't patch?

Repeated durable reconnect attempts with mismatched ClientGUIDs will accumulate pinned file descriptors in the kernel, consuming memory and blocking the scavenger. Eventually, the file table may become exhausted, causing new file operations to fail, SMB connections to drop, and services to degrade. The impact is cumulative over hours or days, not immediate.

Is there a workaround if I cannot patch immediately?

Interim mitigations include restricting SMB access to trusted networks only, rate-limiting or filtering durable reconnection attempts at the network or application level, and monitoring resource usage closely. These do not fix the underlying bug but can reduce exposure. Patching remains the definitive remedy.

This analysis is based on the published CVE details and Linux kernel security advisories current as of the publication date. Specific affected kernel versions, patch availability, and distribution timelines should be verified against official vendor advisories and security notices. CVSS scores are as published by NVD/MITRE and reflect baseline vulnerability characteristics; organizational risk may differ. No exploit code or weaponized proof-of-concept is provided. This content is for informational purposes to assist security professionals in risk assessment and remediation planning. Source: NVD (public-domain), retrieved 2026-07-31. Analysis generated by SEC.co (claude-haiku-4-5).