CVE-2026-139230: ksmbd: fix fd_limit accounting across durable reconnects
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix fdlimit accounting across durable reconnects
A disconnected durable handle keeps its ksmbdfile and the fdlimit 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 ksmbdopenfd() 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 fdlimit 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 STATUSINSUFFICIENTRESOURCES mapping.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Systems running the Linux kernel SMB server component, ksmbd, are exposed when they handle durable SMB connections that disconnect and reconnect. Repeated durable reconnects can reduce the server-wide open-file budget over time.
What would an attacker or client need to do to trigger the problem?
A client needs to establish a durable handle, disconnect it, and repeatedly reconnect it. Each reconnect can consume an additional fd_limit reservation for the same file, while final close releases only one reservation.
How would this affect the server in practice?
The server-wide open-file budget can be permanently depleted by repeated reconnects. Once exhausted, new opens continue to fail with -EMFILE, mapped to STATUS_INSUFFICIENT_RESOURCES for SMB clients.
Is there a configuration-only workaround if patching cannot happen immediately?
The provided information does not identify a configuration workaround. Reducing exposure to repeated durable-handle reconnect activity may limit triggering, but no specific mitigation is stated.