CVE-2024-57925: ksmbd: fix a missing return value check bug
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix a missing return value check bug
In the smb2_send_interim_resp(), if ksmbd_alloc_work_struct()
fails to allocate a node, it returns a NULL pointer to the
in_work pointer. This can lead to an illegal memory write of
in_work->response_buf when allocate_interim_rsp_buf() attempts
to perform a kzalloc() on it.
To address this issue, incorporating a check for the return
value of ksmbd_alloc_work_struct() ensures that the function
returns immediately upon allocation failure, thereby preventing
the aforementioned illegal memory access.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel ksmbd flaw where an allocation failure is not checked before later memory access. On affected systems, a low-privileged local attacker could potentially cause integrity or availability impact. It matters most for Linux hosts using the in-kernel SMB server component.
Executive priority
Treat as high priority for Linux servers where ksmbd is used or local user access is common. Prioritize standard kernel patching, but do not frame this as confirmed active exploitation from the supplied sources.
Technical view
The bug is in ksmbd smb2_send_interim_resp(). If ksmbd_alloc_work_struct() returns NULL, later handling can write through in_work->response_buf, causing illegal memory access. The CVSS vector is local, low complexity, low privileges, no user interaction, with high integrity and availability impact.
Likely exposure
Exposure is most likely on Linux systems running affected kernel builds with ksmbd present or enabled. Systems using vendor kernels should map their package version to vendor advisories, because the source bundle lists upstream stable commits and Debian LTS guidance rather than every distribution build.
Exploitation context
The source bundle does not show CISA KEV listing or any cited evidence of active exploitation. The CVSS vector indicates local access with low privileges is required, so this is not presented as a remote unauthenticated SMB exploit based on the provided evidence.
Researcher notes
Evidence supports a missing NULL return check in ksmbd with CWE-476 characteristics and local PR:L exploitation conditions. The affected-version data is upstream-oriented and partly distribution-dependent, so validation should rely on vendor package advisories and referenced stable commits.
Mitigation direction
Apply vendor kernel updates that include the referenced upstream stable fixes.
Review Debian LTS guidance if running affected Debian kernel packages.
If ksmbd is unnecessary, follow vendor guidance for disabling that component.
Track distribution advisories for backported fixes, not only upstream version numbers.
Validation and detection
Inventory Linux kernel versions across servers and appliances.
Identify systems where the ksmbd kernel SMB server is installed, loaded, or enabled.
Map each kernel package to vendor advisories or fixed stable commits.
Prioritize validation on multi-user systems where local low-privileged access exists.
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.
cwe · low confidence lookup
CWE-476: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
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.
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.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-476 · source CWE mapping
NULL Pointer Dereference
NULL Pointer Dereference represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.