P.K. SHARMA

Cyber security intelligence, AI governance, practitioner analysis

Linux kernel maintainers scramble after KSMBD remote execution flaws leak to LKML

Linux kernel developers are rushing emergency patches after Trend Micro Zero Day Initiative accidentally leaked reports for two critical CVSS 9.0 remote code execution vulnerabilities in the in-tree KSMBD file server directly to the public Linux Kernel Mailing List.

By Parminder Kumar Sharma · · 5 min read

Linux kernel maintainers scramble after KSMBD remote execution flaws leak to LKML

Linux kernel maintainers are pushing out emergency patches following an accidental disclosure leak that exposed two critical remote code execution vulnerabilities in the kernel in-tree SMB3 server, KSMBD, directly to public mailing lists. Tracked under Zero Day Initiative case identifiers ZDI-CAN-33774 and ZDI-CAN-33549, both flaws carry a critical CVSS base score of 9.0. The vulnerabilities allow unauthenticated remote attackers with network access to TCP port 445 to trigger kernel heap memory corruption and achieve arbitrary code execution in Ring 0.

The disclosure occurred when vulnerability reports submitted by researchers through Trend Micro Zero Day Initiative were mistakenly copied to the public Linux Kernel Mailing List (LKML) and subsystem development lists rather than being confined to the private kernel security team. The public distribution of complete technical root cause analyses and proof-of-concept mechanics sparked immediate friction between security researchers and core kernel maintainers, who had to rapidly coordinate patch integration across active git branches before malicious exploitation could proliferate.

KSMBD was merged into mainline Linux in kernel version 5.15 as a high-performance, kernel-space alternative to user-space Samba daemon (smbd), optimized for high-throughput network-attached storage and RDMA fabrics. While major enterprise distributions like Red Hat Enterprise Linux do not enable KSMBD by default, the module is widely compiled and active across modern cloud container hosts, high-performance computing clusters, and embedded storage appliances. For exposed deployments, the flaws present an immediate pre-authentication compromise vector.

Technical execution flow of the KSMBD protocol dispatch race and heap memory corruption

Figure 1: Complete execution chain of ZDI-CAN-33774, illustrating how mixed SMB1 and SMB2 packets sent over a single TCP stream trigger worker thread type confusion and kernel heap overrun.

Vulnerability telemetry, component breakdown, and disclosure parameters

Both disclosed vulnerabilities have been evaluated at CVSS v3.1 base scores of 9.0. The attack vector is Network (AV:N), attack complexity is High (AC:H) due to race-window timing or RDMA buffer alignment requirements, privileges required are None (PR:N) for the protocol dispatch flaw, user interaction is None (UI:N), and the scope is Changed (S:C), reflecting host kernel takeover and container escape capabilities.

Table 1: Technical attributes, affected subsystems, and remediation status for KSMBD remote execution vulnerabilities.

Investigation ParameterTechnical ValueOperational Context
Primary Flaw IdentifierZDI-CAN-33774Protocol dispatch race condition in KSMBD PDU parser
Secondary Flaw IdentifierZDI-CAN-33549Integer underflow in SMB Direct (RDMA) transmit path
CVSS v3.1 Base Score9.0 (Critical)Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Affected Subsystemfs/smb/serverLinux in-tree SMB3 server implementation (KSMBD)
Target Network PortTCP 445Default SMB protocol network transport port
Authentication RequirementUnauthenticated (ZDI-CAN-33774)No valid credentials required for protocol confusion
Upstream Fix Commit68f410faedafPatch committed by KSMBD maintainer Namjae Jeon
Disclosure PlatformPublic LKML mailing listsAccidental public leak prior to stable tree tagging
Primary Workaroundrmmod ksmbdUnloading kernel module neutralises attack surface instantly
Enterprise Default StatusDisabled in RHEL/CentOSEnabled in custom storage NAS and bleeding-edge distros

Anatomy of the protocol dispatch race and SMB Direct arithmetic underflow

The core flaw in ZDI-CAN-33774 centres on how KSMBD handles concurrent protocol operations across worker threads. When clients communicate over TCP port 445, the connection structure stores function pointers in conn->ops to route incoming Protocol Data Units (PDUs) to appropriate protocol handlers. In mixed SMB environments, KSMBD allows dynamic switching between SMB1 legacy negotiation and SMB2/SMB3 modern dialects.

An attacker transmits a specially constructed burst of short SMB1 packets immediately followed by an SMB2 packet within a single TCP write operation. Because connection state updates lack atomic synchronization across worker threads, a race window opens where the incoming SMB1 payload is processed using an SMB2 handler function. The SMB2 handler expects longer, structured header boundaries and lacks length verification for the shorter SMB1 data. This results in out-of-bounds heap reads that disclose sensitive kernel pointers, followed by out-of-bounds writes in functions like smb2_set_info and parse_sec_desc, granting memory corruption primitives.

Concurrently, ZDI-CAN-33549 exposes an arithmetic underflow flaw in the SMB Direct transmission routine (smbdirect_connection_rdma_xmit). When clients negotiate SMB Direct over Remote Direct Memory Access (RDMA) networks, the server calculates remaining payload buffer lengths. If an attacker submits malicious RDMA descriptors where the initial buffer length exceeds the total declared payload, an integer underflow causes the length variable to wrap into a large unsigned integer, driving a kernel heap buffer overrun.

Kernel hardening roadmap and server mitigation checklist

Until Linux distributions distribute official security kernel builds incorporating commit 68f410faedaf and associated RDMA patches, administrators should implement defense-in-depth isolation.

Take this with you

Linux Server KSMBD Hardening and Remediation Checklist

  • Audit running servers to determine whether the ksmbd kernel module is loaded using the command: lsmod | grep ksmbd.
  • If KSMBD is loaded but user-space Samba (smbd) is intended, immediately unload the module using: modprobe -r ksmbd.
  • Blacklist the ksmbd module in /etc/modprobe.d/blacklist.conf by adding: blacklist ksmbd to prevent automatic loading upon network socket activation.
  • Inspect perimeter and host-level firewall rules (iptables or nftables) to ensure TCP port 445 is strictly restricted to trusted internal administrative subnets.
  • For deployments utilizing SMB Direct, audit RDMA interface access and restrict untrusted clients from negotiating Remote Direct Memory Access transports.
  • Monitor kernel dmesg and system logs for kernel warnings, segmentation faults, or null pointer dereferences associated with fs/smb/server.
  • Apply distribution kernel updates promptly once upstream commit 68f410faedaf is backported into stable vendor branches.

Sources

  1. PrimaryKSMBD vulnerability reports and maintainer correspondence (ZDI-CAN-33774 / ZDI-CAN-33549)Linux Kernel Mailing List (LKML)accessed 2026-10-25
  2. Primaryksmbd: fix connection operations race condition in protocol dispatch (commit 68f410faedaf)Kernel.org Git Repositoriesaccessed 2026-10-25
  3. PrimaryZDI Vulnerability Advisories and Disclosure PipelineTrend Micro Zero Day Initiativeaccessed 2026-10-25

Share this briefing

Know someone who owns this problem? Send it to them.

Related briefings

The briefing, in your inbox

Practitioner analysis of cyber and AI security news. No vendor noise.

How often

Every new briefing in one email, at 7am, or at 7am, 12:30pm and 6pm. Nothing is sent when nothing is new. Unsubscribe any time.