CVE-2026-99747: ksmbd: fix NULL pointer dereference in session_user_name() and session_account_type()
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix NULL pointer dereference in sessionusername() and sessionaccounttype()
sessionusername() and sessionaccounttype() dereference session->user without checking for NULL. A session can be published and exposed via the procfs session interface before authentication completes, during which session->user is NULL:
showprocsession() -> sessionusername(sess) -> userguest(session->user) -> NULL->flags -> oops
Guard both functions by treating a NULL session->user as an explicit not-yet-authenticated state rather than dereferencing it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.5-1
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel's ksmbd SMB server functionality are exposed when the procfs session interface can observe a session before authentication has completed. The vulnerable path is in procfs session reporting, not in an authenticated session.
What condition triggers the crash?
A ksmbd session must be published before authentication completes, leaving session->user as NULL, and the procfs session display path must call session_user_name() or session_account_type(). Those functions dereference the NULL user pointer, causing an oops.
How does the fix change handling of incomplete sessions?
The fix treats a NULL session->user as an explicit not-yet-authenticated state. This prevents session_user_name() and session_account_type() from dereferencing the pointer before authentication has assigned a user.