Security

KSMBD Exposure Checker

Two critical flaws in KSMBD, the Linux kernel's built-in SMB file server, were disclosed before any fix existed (ZDI-CAN-33774 and ZDI-CAN-33549, CVSS 9.0). Paste the output of the commands below to see if this server is exposed.

Run on the server and paste the outputuname -rlsmod | grep -E '^Module|ksmbd'systemctl is-active ksmbdss -ltn 'sport = :445'ls /sys/class/infiniband
Paste the command output

Paste the output of at least lsmod and systemctl from the list on the left. The checker needs to see whether the ksmbd module is loaded.

Turn KSMBD off until a fix ships

If you don't need KSMBD (most servers use Samba instead), stop it, unload the module and stop it from loading again:

sudo systemctl disable --now ksmbdsudo modprobe -r ksmbdecho 'install ksmbd /bin/false' | sudo tee /etc/modprobe.d/disable-ksmbd.conf

If you must keep it: allow port 445 only from trusted hosts at the firewall, remove guest shares, leave SMB Direct (RDMA) off, and watch your distribution's security tracker for a fixed kernel.

Checked in your browser. What you paste is never uploaded.

A Linux server with a shared folder and a padlock on a network port, behind a shield

How to use

  1. Read the first sections below to see what goes wrong inside KSMBD and which servers can be reached.
  2. On the server, run the five commands shown next to the box (or copy them all at once) and paste the output.
  3. Read the verdict: Exposed, KSMBD is running, Not exposed, or Kernel has no KSMBD. If KSMBD runs and you don't need it, copy the commands to turn it off and run them as root.
  4. Run the check again to confirm the module is gone, then repeat on every server, VM and appliance image.

What happened

On October 21 and 22, 2026, Trend Micro's Zero Day Initiative posted six Linux kernel bug reports to public mailing lists before fixes were released. Two are in KSMBD, the SMB3 file server built into the kernel, and both are rated CVSS 9.0: ZDI-CAN-33774 and ZDI-CAN-33549, found by Hyeontae Lee. SMB is the protocol Windows uses for shared folders, on TCP port 445.

What causes ZDI-CAN-33774: the server switches rulebooks mid-conversation

An SMB connection starts with a negotiation: client and server agree on the protocol version, the old SMB1 or the newer SMB2/3. KSMBD then sets the connection's handler table, the set of functions that will read every later message, to match that version.

The bug is a race. KSMBD's receive thread keeps reading new messages from the network while a worker is still handling the negotiation. If an attacker sends, in one TCP write, a burst of SMB1 messages followed by an SMB2 message, the SMB2 message can swap the handler table to SMB2 while a worker is still processing one of the earlier, shorter SMB1 messages. The worker then reads that short message with SMB2 rules, which expect a longer one, and goes past its end. It is like a translator who switches from French to German halfway through a sentence and keeps reading words that aren't there.

No login and no share are needed: anyone who can reach port 445 can try. The public proof of concept leaks 28 bytes of kernel memory per attempt and can crash the server; ZDI rates it as remote code execution, and a write past the buffer is possible with access to a share. The fix, "ksmbd: wait for negotiation before receiving another PDU" (commit 68f410faedaf), makes KSMBD hold further messages until negotiation is finished.

What causes ZDI-CAN-33549: a counter that rolls over

SMB Direct lets SMB move file data over RDMA, network cards that copy straight into the other machine's memory. The client describes its memory buffers with a list of descriptors, each with a length. If the first descriptor claims to be longer than the data actually sent, KSMBD trims it and sets the remaining length to zero, but then subtracts the original, untrimmed length from that zero.

The counter can't go below zero, so it wraps around to a huge number, like a car odometer rolling backward from 000000 to 999999. A later memory copy trusts that number and writes past the end of its buffer, up to about 8 KB according to Sysdig. This path needs an RDMA network card (or the rxe software driver), SMB Direct turned on, and a writable share.

Who is affected

Only servers where KSMBD is actually running. It has been in the kernel since Linux 5.15, but it is a module that stays off unless you install ksmbd-tools and start the ksmbd service. Samba, the usual Linux file server, is a separate program and is not affected. Red Hat Enterprise Linux doesn't ship KSMBD, AlmaLinux and CloudLinux 9 and 10 kernels don't build it, and most desktops never load it. Small NAS boxes, routers and appliances are worth a look, since some use KSMBD for speed; if you can't log in to check, ask the vendor.

Status on October 29, 2026

ZDI-CAN-33774ZDI-CAN-33549
Login neededNoYes, a writable share
FixCommit 68f410faedaf, in the KSMBD development tree; not in a released kernel yetPatches posted (Oct 23); not merged
CVE numberNot yetNot yet
Public exploitMemory leak and crash, no code executionCrash in lab tests
Attacks seenNone reportedNone reported

How to check a server

A terminal window and a server, with a magnifying glass over a folder icon

lsmod shows whether the ksmbd module is loaded and systemctl is-active ksmbd shows whether the service runs. ss -ltn 'sport = :445' lists anything listening on the SMB port, and /sys/class/infiniband lists RDMA devices. The checker reads all of these from the pasted text.

Ways to protect a server

A server with a power plug pulled out of a network port and a shield beside it

Turn it off: stop and disable the service, unload the module, and add a modprobe rule so it can't load again at boot. If you need SMB file sharing, Samba can usually take over the same shares.

If KSMBD has to stay: allow TCP 445 only from trusted hosts at the firewall and never from the internet. That is the only control that covers ZDI-CAN-33774, because it needs no login. Remove guest-accessible shares, and keep SMB Direct and RDMA off unless you rely on them; that closes ZDI-CAN-33549.

Watch for it: bursts of connections to port 445 that end in abrupt disconnects, and kernel oops or panic messages that mention ksmbd or fs/smb/server (journalctl -k). Neither alone proves an attack. Then install your distribution's fixed kernel as soon as one is released.

Frequently asked questions

Is Samba affected?

No. Samba runs in user space and is a different code base. These two flaws are in the kernel's KSMBD module only.

Is there a CVE number?

Not yet. The Linux kernel project assigns CVE numbers once a fix has landed in a stable kernel, so the flaws are known by their ZDI numbers for now. This page will add the CVE numbers when they appear.

Does blocking port 445 protect me?

It stops attackers who can't reach the port, which covers ZDI-CAN-33774 from outside your network. Anyone already inside the network can still reach it, so turning KSMBD off is safer.

Why were the bugs made public before a fix?

ZDI posted the reports to the kernel's public mailing lists, which is where kernel bugs are normally discussed. That is why the cause is known while released kernels are still unpatched.

Is what I paste uploaded?

No. The check runs in your browser and nothing you paste leaves your device.

Found a problem or have an idea? Report a problem

Share

You might also like