CVE-2026-99083: ksmbd: fix heap out-of-bounds write in krb5_authenticate()
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix heap out-of-bounds write in krb5authenticate()
In krb5authenticate(), outlen is calculated to determine available headroom in responsebuf for the incoming Kerberos AP-REP token. However, when SMB2SESSIONSETUP is processed as a non-first element of a compounded SMB2 request, the calculation omits work->nextsmb2rsphdroff.
This causes outlen to overstate remaining buffer headroom by the cumulative size of prior responses in the compound chain. Consequently, the length check in ksmbdkrb5authenticate() (outlen <= resp->spnegobloblen) passes erroneously, allowing memcpy() to write the AP-REP blob past the end of responsebuf into adjacent kernel heap memory.
Fix this by subtracting work->nextsmb2rsphdroff when computing outlen, ensuring it accurately reflects physical remaining buffer space.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.12-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.115-2~deb12u1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-2Fixed in 6.12.117-1Fixed in 7.2.15-1Fixed in 7.3.4-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.117-1~deb12u1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.224 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.5 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.160 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.114 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.58 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.12 - Compensating control
In ksmbd krb5_authenticate(), subtract work->next_smb2_rsp_hdr_off when computing out_len so it reflects the physical remaining space in response_buf.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems running the Linux kernel with the ksmbd SMB server component in use are relevant. The vulnerable path is reached while processing Kerberos authentication for SMB2 session setup requests.
What must an attacker send to trigger the out-of-bounds write?
The request must cause SMB2_SESSION_SETUP to be processed as a non-first element in a compounded SMB2 request and include an incoming Kerberos AP-REP token. Prior responses in the compound chain cause the available response-buffer space to be overstated.
What is the effect of successful exploitation?
The flawed length check can allow the Kerberos AP-REP blob to be copied beyond the end of response_buf and into adjacent kernel heap memory. This is a kernel heap out-of-bounds write.
How can the issue be mitigated if an update cannot be applied immediately?
The provided information identifies ksmbd SMB handling and Kerberos authentication as the affected path. It does not provide a specific temporary mitigation or configuration workaround.