ksmbd - Fuzzing Improvements and Vulnerability Discovery (2/... #1383
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Doyensec’s ksmbd Fuzzing (Part 2): Deeper State, Grammar-Aware Inputs, and 23 Vulnerabilities
Context
This second post in Doyensec’s ksmbd series explains how they expanded fuzzing for Linux’s in-kernel SMB server (
ksmbd
) to reach deeper, stateful code paths and uncover 23 bugs (mostly UAF and OOB). It provides concrete harness code, syzkaller configs (including experimental features), sanitizer outcomes, and a CVE-indexed bug list. Kerberos and ...🔧 Technical Details
Expand SMB attack surface via configuration: Enable durable handles, leases, multi-channel, and VFS objects to force ksmbd into deeper parsers/handlers beyond defaults (oplocks). Target hot paths in
smb2pdu.c
,smbacl.c
,ndr.c
,oplock.c
,vfs.c
,vfs_cache.c
.Make stateful SMB fuzzable without Kerberos: Patch NTLMv2 acceptance, allow guest, and set
map to guest = bad user
. Patch out SMB credits (post-CVE-2024-50285 hardening) and raisemax connections
to 65536 to avoid rate-limiting/exhaustion during fuzzing.Stateful request chaining: Within a single pseudo-syscall, parse responses to extract
SessionId
,TreeID
, andFileIDs
and reuse them acrosssmb2_create → smb2_ioctl → smb2_close
to preserve server state and reach deeper handlers.Grammar-driven SMB2 generation: Translate Microsoft SM...
🤖 Agent Actions
I analyzed the blog and HackTricks, explored the repo, and implemented an update.
What I checked
What I added
New page (technical methodology) under SMB:
Linked the new page from the main SMB page:
{{#ref}}
ksmbd-attack-surface-and-fuzzing-syzkaller.md
{{#endref}}
Rationale
Changes implemented
If you want me to also cross-link from the AI-Assisted-Fuzzing page or other fuzzing-related areas, I can add references, but I prioritized keeping the update within the SMB pentesting section as requested.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
🗑️ File Cleanup