CVE-2026-139230

ksmbd: fix fd_limit accounting across durable reconnects

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ksmbd: fix fd_limit accounting across durable reconnects

A disconnected durable handle keeps its ksmbd_file and the fd_limit
reservation taken at its initial open. Reconnecting allocates another
volatile ID and takes another reservation for the same file. Final close
returns only one reservation, so repeated reconnects permanently reduce
the server-wide open-file budget.

Move reservation into ksmbd_open_fd() and release it on every creation
failure. Keep the reservation until final close, including while a durable
handle is disconnected. Make ID allocation independent of fd_limit so
reconnects neither consume nor return slots. This also avoids returning an
unreserved slot when persistent ID allocation fails.

New opens continue to return -EMFILE when the budget is exhausted, keeping
the existing STATUS_INSUFFICIENT_RESOURCES mapping.

Analysis

AI-generated

Technical impact

In the Linux kernel's ksmbd component, an accounting flaw allows a durable client handle to retain a file descriptor reservation after the connection is lost. During reconnection, a new reservation is granted for the same file, but the original reservation is only released when the final close occurs. Repeated durable reconnects accumulate unused reservations, progressively shrinking the server's available file descriptor pool and eventually causing new opens to fail with EMFILE. The impact is a server‑wide denial of service that can prevent legitimate clients from establishing new connections once the fd limit is exhausted.

Affected Systems

Affected systems are Linux distributions running kernel versions that include the ksmbd module before the fix was applied. The vulnerability is present in the default Linux:Linux kernel builds; specific version ranges are not listed, but the issue is resolved in kernel commits 7ec4998, 883670d, df5c868, and fcaa65f. Administrators should verify whether their systems incorporate these commits and, if not, consider them vulnerable.

Risk and Exploitability

The CVSS score is not provided, and the EPSS score is unavailable, but the bug is not listed in CISA's KEV catalog. The absence of a published exploit does not preclude risk, as the flaw enables a local or network attacker who can issue durable SMB connections to repeatedly consume file descriptor slots. The complexity of exploiting the bug is low, requiring only repeated reconnections over the SMB protocol, and the impact is significant because it can lead to complete service disruption. Administrators should treat this as a high‑risk vulnerability that can be mitigated by applying the kernel patch.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the ksmbd fd_limit accounting fix (commits 7ec4998, 883670d, df5c868, fcaa65f).
  • Restart the system or reload ksmbd after the kernel update to apply the changes.
  • Verify the fix by monitoring kernel logs for EMFILE errors and testing durable reconnect behavior to ensure that file descriptor reservations are correctly managed.

Generated by OpenCVE AI on November 30, 2026 at 20:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-404
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix fd_limit accounting across durable reconnects A disconnected durable handle keeps its ksmbd_file and the fd_limit reservation taken at its initial open. Reconnecting allocates another volatile ID and takes another reservation for the same file. Final close returns only one reservation, so repeated reconnects permanently reduce the server-wide open-file budget. Move reservation into ksmbd_open_fd() and release it on every creation failure. Keep the reservation until final close, including while a durable handle is disconnected. Make ID allocation independent of fd_limit so reconnects neither consume nor return slots. This also avoids returning an unreserved slot when persistent ID allocation fails. New opens continue to return -EMFILE when the budget is exhausted, keeping the existing STATUS_INSUFFICIENT_RESOURCES mapping.
Title ksmbd: fix fd_limit accounting across durable reconnects
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-404

    Improper Resource Shutdown or Release

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM