CVE-2025-38191: ksmbd: fix null pointer dereference in destroy_previous_session
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix null pointer dereference in destroy_previous_session
If client set ->PreviousSessionId on kerberos session setup stage,
NULL pointer dereference error will happen. Since sess->user is not
set yet, It can pass the user argument as NULL to destroy_previous_session.
sess->user will be set in ksmbd_krb5_authenticate(). So this patch move
calling destroy_previous_session() after ksmbd_krb5_authenticate().
Security readout for executives and security teams
Plain-English summary
A remote client can crash a Linux system’s ksmbd SMB service during Kerberos session setup, causing service disruption and potentially broader host instability. The issue does not expose or alter data according to the supplied CVSS assessment. Risk is concentrated on systems that enable ksmbd, use Kerberos authentication, and accept SMB connections from untrusted networks.
Executive priority
Prioritize exposed ksmbd servers and business-critical file services. Patch promptly where Kerberos authentication is used or SMB is reachable beyond trusted networks. Systems without ksmbd are not indicated as exposed by the supplied description. Treat service restriction or disablement as interim controls, then verify the vendor kernel contains the fix.
Technical view
During Kerberos session setup, a client-supplied PreviousSessionId can reach destroy_previous_session() before sess->user is initialized, causing a NULL pointer dereference. The kernel fix moves this call until after ksmbd_krb5_authenticate() sets the user. CVSS 3.1 is 7.5: network-reachable, low complexity, no privileges or interaction, with availability impact only.
Likely exposure
Likely exposure requires the Linux kernel ksmbd SMB server and the affected Kerberos session-setup path. Internet-facing or broadly reachable SMB services carry greater risk. The supplied affected-version data is ambiguous and includes unusual entries, so determine exposure using the running distribution kernel and its vendor advisory rather than version strings alone.
Exploitation context
The supplied record is not in CISA KEV, and no provided evidence establishes active exploitation. Its CVSS vector indicates an unauthenticated remote availability attack is possible. A client-controlled PreviousSessionId during Kerberos session setup can trigger the vulnerable state, but practical reliability and host-level consequences are not established by the supplied evidence.
Researcher notes
The defect is an ordering error: destroy_previous_session() receives a NULL user before Kerberos authentication initializes sess->user. The cited correction reorders that operation. The bundle provides several stable-kernel commits but does not clearly map each affected release to a fixed release. No confidentiality or integrity impact, exploit publication, or active campaign is established here.
Mitigation direction
Install a vendor-supported kernel containing the referenced ksmbd fix.
Consult the Linux distribution’s advisory to map fixed package versions accurately.
Disable ksmbd if SMB service is unnecessary.
Restrict SMB access to trusted networks and clients until patched.
Validation and detection
Confirm whether ksmbd is enabled or loaded on each Linux host.
Identify whether ksmbd uses Kerberos authentication in the deployed configuration.
Record the running kernel and distribution package versions.
Verify the installed kernel includes the applicable referenced stable fix.
Confirm firewall policy prevents untrusted access to the SMB service.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-38191 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
8Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.