CVE-2025-37778: ksmbd: Fix dangling pointer in krb_authenticate
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: Fix dangling pointer in krb_authenticate
krb_authenticate frees sess->user and does not set the pointer
to NULL. It calls ksmbd_krb5_authenticate to reinitialise
sess->user but that function may return without doing so. If
that happens then smb2_sess_setup, which calls krb_authenticate,
will be accessing free'd memory when it later uses sess->user.
Security readout for executives and security teams
Plain-English summary
A Linux kernel SMB server flaw can leave a deleted user-session object referenced during Kerberos authentication. A later session-setup operation may use that invalid memory, potentially causing severe confidentiality, integrity, or availability impact. Risk is concentrated on systems running the affected ksmbd functionality, especially where SMB is network-reachable.
Executive priority
Prioritize urgent assessment of network-reachable ksmbd servers. Patch confirmed exposures promptly, while treating internet-accessible or broadly reachable SMB services as highest priority. Systems not running ksmbd are unlikely to reach the vulnerable path described.
Technical view
krb_authenticate frees sess->user without clearing the pointer. If ksmbd_krb5_authenticate returns without replacing it, smb2_sess_setup later dereferences freed memory. This is a dangling-pointer memory-safety flaw in ksmbd's Kerberos session path. The supplied CVSS 3.1 rating is 9.8, but the sources do not establish a specific realized outcome.
Likely exposure
Likely exposure is limited to Linux systems using affected ksmbd code and the relevant Kerberos authentication path. Network-reachable SMB services increase concern. The supplied affected-version data is ambiguous and should not replace distribution-specific package or kernel advisories.
Exploitation context
CISA KEV status is false in the supplied bundle, and no cited source establishes active exploitation or a public exploit. The CVSS vector describes unauthenticated, network-accessible, low-complexity risk, but that rating alone does not prove reliable exploitation.
Researcher notes
The failure condition requires ksmbd_krb5_authenticate to return without reinitializing sess->user after it was freed. The later dereference occurs in smb2_sess_setup. Sources identify stable-kernel fixes, but provide no exploit demonstration, attack telemetry, CWE assignment, or precise branch-by-branch vulnerable ranges in this bundle.
Mitigation direction
Install a vendor-supported kernel containing the applicable referenced stable fix.
Follow Linux distribution guidance to identify the corrected package for each kernel branch.
Restrict network access to ksmbd services until affected systems are updated.
Disable unused ksmbd or Kerberos-backed SMB functionality according to vendor guidance.
Validation and detection
Inventory systems running ksmbd and identify their exact kernel and distribution package versions.
Determine whether SMB is remotely reachable and Kerberos authentication is configured.
Compare installed kernels with distribution advisories and the referenced stable fixes.
After updating, confirm systems booted into the corrected kernel.
Monitor kernel and SMB service logs for abnormal session failures or crashes.
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-37778 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.