CVE-2026-135107 in Red Hat
Summary
by MITRE • 11/27/2026
An **uncontrolled memory allocation** flaw has been found in the smbd_smb2_ioctl_pipe_write_done() function in source3/smbd/smb2_ioctl_named_pipe.c of the SMB2 named-pipe ioctl handling in the **Samba** package. The file server reserves memory for a named-pipe response using a size chosen by the client. It does not keep that size within the maximum the client and the server have already agreed. A low-privileged network attacker or user who can open a named pipe can request a very large response. The file server reserves that memory before it reads the pipe and holds it until the request ends. Repeating this on more connections can exhaust memory and keep the file service unavailable while those requests continue.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/28/2026
The vulnerability identified in the Samba package represents a critical uncontrolled memory allocation flaw within the SMB2 named-pipe ioctl handling mechanism, specifically located in the smbd_smb2_ioctl_pipe_write_done function found in source3/smbd/smb2_ioctl_named_pipe.c. This security defect arises from an improper validation of input parameters provided by remote clients during the negotiation and execution phases of a Server Message Block version 2 protocol session. When a client initiates a request to interact with a named pipe via ioctl operations, the server allocates memory buffers intended for storing response data. The core technical failure lies in the fact that Samba accepts a buffer size specified directly by the attacker without verifying it against the maximum payload limits previously established during the SMB2 session negotiation phase. This lack of bounds checking allows an adversary to dictate the amount of system resources consumed, bypassing standard protocol constraints designed to prevent excessive resource consumption.
From an operational perspective, this flaw enables a low-privileged network user or any entity capable of opening a named pipe on the affected Samba server to trigger a denial-of-service condition through memory exhaustion. By repeatedly sending requests with excessively large response size parameters, an attacker can force the file service to reserve substantial amounts of RAM for each connection. Crucially, this allocated memory is retained by the server until the request completes or times out, meaning that even if the actual data payload is small, the reserved buffer remains locked in system memory. This behavior creates a sustained drain on available resources, effectively starving other legitimate processes and connections of necessary memory allocations. The cumulative effect of multiple such requests across different sessions can lead to complete service unavailability as the server runs out of usable memory, rendering it unable to process new or existing file sharing operations.
This vulnerability aligns with Common Weakness Enumeration category CWE-789, which classifies issues related to Uncontrolled Memory Allocation where software allocates memory based on user input without proper validation against expected limits. In terms of offensive security tactics, this flaw facilitates the MITRE ATT&CK technique T1496 Resource Hijacking, specifically under the sub-category of Denial of Service via resource exhaustion. Attackers leverage this weakness not to gain unauthorized access or execute code, but to degrade service availability and disrupt business continuity by consuming critical system resources. The impact is particularly severe in environments where Samba serves as a primary file server for multiple concurrent users, as the ability to selectively target memory allocation can be used to isolate specific services or bring down entire network segments dependent on that infrastructure.
Mitigation strategies must focus on enforcing strict input validation and resource limits at both the application logic level and system configuration level. Developers should modify the smbd_smb2_ioctl_pipe_write_done function to validate the requested response size against the maximum negotiated buffer sizes defined in the SMB2 protocol specification before allocating memory. Implementing hard caps on named pipe request sizes ensures that no single client can consume disproportionate resources regardless of their input parameters. Additionally, system administrators should configure operating-level limits such as ulimit settings for file descriptors and virtual memory to restrict the impact of any successful exploitation attempt. Regular patching is essential, as vendors typically release updates addressing these specific logic flaws in named pipe handling routines. Monitoring tools should also be deployed to detect anomalous patterns of high-frequency ioctl requests with large payload declarations, allowing for rapid identification and isolation of potentially malicious sessions before significant resource depletion occurs.