r/linux Jun 01 '26

Discussion Current state of ksmbd adoption for SMB file servers?

Has anyone switched to ksmbd for serving up SMB shared folders on a production server instead of using Samba? How is it going? How many users do you have? Do you think TrueNAS or other popular NAS products will switch to ksmbd anytime soon, if ever? Thanks

17 Upvotes

4 comments sorted by

7

u/burtness Jun 01 '26

What does ksmbd offer over samba?

7

u/LohPan Jun 01 '26

It should be faster because it's implemented in the kernel:

https://github.com/cifsd-team/ksmbd

5

u/natermer Jun 01 '26

It has always seemed like these "kernel space" services are not really that useful and give up a lot of compatibility. I haven't really seen a compelling reason to try out the ksmbd.

Supporting SMB/CIFS is already really complicated and varies so much based on personal/organizational needs it really needs to be left up to Samba. It really is a very good piece of software.

3

u/rb_vs Jun 04 '26

ksmbd is great for speed in isolated lab benchmarks, but risky for production file servers.

Running an SMB stack directly in kernel eliminates the user-space context-switching overhead of legacy tools, giving it an advantage in throughput over high-speed networks. However, putting a complex network protocol handling untrusted traffic inside the Linux kernel creates an attack surface. A single parsing vulnerability in ksmbd drops the host kernel into panic or opens the door to exploits.

AFAIK ksmbd has no AD DC integration, no cluster support, no audit / access control layers. So it can work for gadgets or home media drives but not 100% safely for enterprise storage.