CVE-2026-31432: ksmbd: fix OOB write in QUERY_INFO for compound requests
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix OOB write in QUERY_INFO for compound requests
When a compound request such as READ + QUERY_INFO(Security) is received,
and the first command (READ) consumes most of the response buffer,
ksmbd could write beyond the allocated buffer while building a security
descriptor.
The root cause was that smb2_get_info_sec() checked buffer space using
ppntsd_size from xattr, while build_sec_desc() often synthesized a
significantly larger descriptor from POSIX ACLs.
This patch introduces smb_acl_sec_desc_scratch_len() to accurately
compute the final descriptor size beforehand, performs proper buffer
checking with smb2_calc_max_out_buf_len(), and uses exact-sized
allocation + iov pinning.
Security readout for executives and security teams
Plain-English summary
A flaw in Linux’s ksmbd SMB file server can let a network user with limited privileges corrupt memory using a specially formed compound request. Successful exploitation could seriously affect confidentiality, integrity, or availability. Systems not running ksmbd are not exposed through this component.
Executive priority
Prioritize within the urgent patch cycle for reachable ksmbd servers, especially those serving many or less-trusted users. Immediately inventory exposure and restrict access while kernel updates are evaluated. Lower priority applies to systems where ksmbd is absent or disabled, but that status should be verified rather than assumed.
Technical view
ksmbd miscalculated response-buffer space when QUERY_INFO(Security) followed a command consuming most of the buffer. The check used an xattr-derived size, although POSIX ACL processing could synthesize a larger security descriptor, causing an out-of-bounds write. The fix calculates the final descriptor size, validates available output space, and uses exact-sized allocation with iov pinning.
Likely exposure
Exposure is concentrated on Linux systems running ksmbd and accepting SMB connections from authenticated, low-privilege users. Internet-accessible or broadly reachable SMB services warrant faster review. The supplied affected-version data is ambiguous, so distribution-specific kernel advisories and commit inclusion should determine actual exposure.
Exploitation context
The CVSS 3.1 score is 8.8: network-accessible, low complexity, low privileges, no user interaction, and potentially high confidentiality, integrity, and availability impact. The bundle marks KEV false and provides no evidence of active exploitation or a public exploit. Memory corruption is established; reliable code execution is not established by these sources.
Researcher notes
The vulnerable path involves compound responses where an earlier READ reduces remaining output space before QUERY_INFO(Security) builds a POSIX ACL-derived descriptor. The patch’s precomputation and buffer validation directly address the size mismatch. Source data lists several versions and commits without clear range semantics; avoid deriving exact vulnerable release boundaries from the flattened list alone.
Mitigation direction
Update to a vendor-supported kernel containing the applicable referenced ksmbd fix.
Check distribution guidance because the supplied affected-version ranges are not sufficiently clear.
Disable ksmbd where SMB service is unnecessary, following vendor operational guidance.
Restrict SMB reachability to trusted networks and authorized users while remediation is pending.
Validation and detection
Confirm whether ksmbd is enabled, loaded, and actively serving SMB connections.
Record the running kernel build and compare it with distribution CVE guidance.
Verify the applicable stable fix commit is included in the installed kernel source or package.
Review network controls to confirm untrusted clients cannot reach the SMB service.
After updating, confirm the remediated kernel is running rather than merely installed.
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-2026-31432 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
0ADP providers
6Source 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.