HIGH Introduced in 6.5
ksmbd CompoundRequest Overflow
CVE-2026-99083
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI9.8CRITICAL
01Description
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix heap out-of-bounds write in krb5_authenticate() In krb5_authenticate(), out_len is calculated to determine available headroom in response_buf for the incoming Kerberos AP-REP token. However, when SMB2_SESSION_SETUP is processed as a non-first element of a compounded SMB2 request, the calculation omits work->next_smb2_rsp_hdr_off. This causes out_len to overstate remaining buffer headroom by the cumulative size of prior responses in the compound chain. Consequently, the length check in ksmbd_krb5_authenticate() (*out_len <= resp->spnego_blob_len) passes erroneously, allowing memcpy() to write the AP-REP blob past the end of response_buf into adjacent kernel heap memory. Fix this by subtracting work->next_smb2_rsp_hdr_off when computing out_len, ensuring it accurately reflects physical remaining buffer space.
02KernelScan AI Analysis
Risk summary
An unauthenticated remote attacker can send a crafted compounded SMB2 request to a ksmbd server, triggering a heap buffer overflow during Kerberos authentication. This allows arbitrary kernel memory corruption, leading to remote code execution, privilege escalation, information disclosure, or denial of service. Any system running the ksmbd kernel SMB server with network exposure is at risk.
Vulnerability analysis
When processing a compounded SMB2 request (multiple commands in one packet), the ksmbd server miscalculates the remaining space in the response buffer for a Kerberos AP-REP token during session setup. The calculation fails to account for space already consumed by prior responses in the compound chain, causing a length check to pass incorrectly. This allows a memcpy() to write the authentication blob past the end of the allocated response buffer into adjacent kernel heap memory. The fix subtracts the cumulative offset of prior responses from the available space calculation, ensuring the length check accurately reflects physical buffer boundaries. The vulnerability is reachable over the network by any unauthenticated sender that can deliver SMB2 traffic to the ksmbd listener on TCP port 445.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.15 | 5.15.145 | 5.15.224 | a07dfb33112a |
| 6.1 | 6.1.40 | 6.1.191 | 1f73a6d40f4d |
| 6.12 | 6.5 | 6.12.114 | 517404e15739 |
| 6.18 | 6.5 | 6.18.58 | 4722d06b2907 |
| 6.4 | 6.4.5 | 6.5 | 59c6dcc5dd9d |
| 6.6 | 6.5 | 6.6.160 | 80af1bde97d5 |
| 7.2 | 6.5 | 7.2.12 | 23a0be6a84a3 |
| mainline | 6.5 | 7.3 | — |
| cip/6.12 | 6.5 | 6.12.114-cip34 | 80af1bde97d5 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.114-cip34 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |