{"id":"CVE-2026-99083","state":"PUBLISHED","title":"ksmbd: fix heap out-of-bounds write in krb5_authenticate()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix heap out-of-bounds write in krb5_authenticate()\n\nIn krb5_authenticate(), out_len is calculated to determine available\nheadroom in response_buf for the incoming Kerberos AP-REP token. However,\nwhen SMB2_SESSION_SETUP is processed as a non-first element of a compounded\nSMB2 request, the calculation omits work->next_smb2_rsp_hdr_off.\n\nThis causes out_len to overstate remaining buffer headroom by\nthe cumulative size of prior responses in the compound chain. Consequently,\nthe length check in ksmbd_krb5_authenticate()\n(*out_len <= resp->spnego_blob_len) passes erroneously, allowing memcpy()\nto write the AP-REP blob past the end of response_buf into adjacent kernel\nheap memory.\n\nFix this by subtracting work->next_smb2_rsp_hdr_off when computing out_len,\nensuring it accurately reflects physical remaining buffer space.","publishedAt":"2026-10-23T12:45:01.735Z","updatedAt":"2026-10-30T12:41:38.581Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"676392184785ace61e939831e7ca44a03d438c3b","status":"affected","lessThan":"a07dfb33112a42437f9d2d0bfd35c68575257381","versionType":"git"},{"version":"ef572ffa8eb44111eed2925fbb2adca78bdcbf61","status":"affected","lessThan":"1f73a6d40f4d1bae4f3491c0ec1ea8ee6ce035ff","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"59c6dcc5dd9dafe764ca0d40525933b2be69b059","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"80af1bde97d5a85ad6f2c40ca894ccc8fa75a27a","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"517404e157395d0f8da125ca956c566895dfcd06","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"4722d06b2907585074252061b1024a696c1cfc23","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"23a0be6a84a38ac169eeab49017934e8e27c65f0","versionType":"git"},{"version":"2ba03cecb12ac7ac9e0170e251543c56832d9959","status":"affected","versionType":"git"},{"version":"5.15.145","status":"affected","lessThan":"5.15.224","versionType":"semver"},{"version":"6.1.40","status":"affected","lessThan":"6.1.191","versionType":"semver"},{"version":"6.4.5","status":"affected","lessThan":"6.5","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.5","versionType":"semver"},{"version":"5.15.224","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.58","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.12","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]}],"references":["https://git.kernel.org/stable/c/a07dfb33112a42437f9d2d0bfd35c68575257381","https://git.kernel.org/stable/c/1f73a6d40f4d1bae4f3491c0ec1ea8ee6ce035ff","https://git.kernel.org/stable/c/59c6dcc5dd9dafe764ca0d40525933b2be69b059","https://git.kernel.org/stable/c/80af1bde97d5a85ad6f2c40ca894ccc8fa75a27a","https://git.kernel.org/stable/c/517404e157395d0f8da125ca956c566895dfcd06","https://git.kernel.org/stable/c/4722d06b2907585074252061b1024a696c1cfc23","https://git.kernel.org/stable/c/23a0be6a84a38ac169eeab49017934e8e27c65f0"],"weaknesses":[],"ingestedAt":"2026-10-30T13:02:04.640Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99083.json","commit":"cb14bf1b43b0c9f05f7f40eae2246263fd430780","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99083","state":"PUBLISHED","datePublished":"2026-10-23T12:45:01.735Z","dateUpdated":"2026-10-30T12:41:38.581Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.390Z"},"containers":{"cna":{"title":"ksmbd: fix heap out-of-bounds write in krb5_authenticate()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix heap out-of-bounds write in krb5_authenticate()\n\nIn krb5_authenticate(), out_len is calculated to determine available\nheadroom in response_buf for the incoming Kerberos AP-REP token. However,\nwhen SMB2_SESSION_SETUP is processed as a non-first element of a compounded\nSMB2 request, the calculation omits work->next_smb2_rsp_hdr_off.\n\nThis causes out_len to overstate remaining buffer headroom by\nthe cumulative size of prior responses in the compound chain. Consequently,\nthe length check in ksmbd_krb5_authenticate()\n(*out_len <= resp->spnego_blob_len) passes erroneously, allowing memcpy()\nto write the AP-REP blob past the end of response_buf into adjacent kernel\nheap memory.\n\nFix this by subtracting work->next_smb2_rsp_hdr_off when computing out_len,\nensuring it accurately reflects physical remaining buffer space."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"676392184785ace61e939831e7ca44a03d438c3b","status":"affected","lessThan":"a07dfb33112a42437f9d2d0bfd35c68575257381","versionType":"git"},{"version":"ef572ffa8eb44111eed2925fbb2adca78bdcbf61","status":"affected","lessThan":"1f73a6d40f4d1bae4f3491c0ec1ea8ee6ce035ff","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"59c6dcc5dd9dafe764ca0d40525933b2be69b059","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"80af1bde97d5a85ad6f2c40ca894ccc8fa75a27a","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"517404e157395d0f8da125ca956c566895dfcd06","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"4722d06b2907585074252061b1024a696c1cfc23","versionType":"git"},{"version":"98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8","status":"affected","lessThan":"23a0be6a84a38ac169eeab49017934e8e27c65f0","versionType":"git"},{"version":"2ba03cecb12ac7ac9e0170e251543c56832d9959","status":"affected","versionType":"git"},{"version":"5.15.145","status":"affected","lessThan":"5.15.224","versionType":"semver"},{"version":"6.1.40","status":"affected","lessThan":"6.1.191","versionType":"semver"},{"version":"6.4.5","status":"affected","lessThan":"6.5","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.5","versionType":"semver"},{"version":"5.15.224","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.58","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.12","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2pdu.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/a07dfb33112a42437f9d2d0bfd35c68575257381"},{"url":"https://git.kernel.org/stable/c/1f73a6d40f4d1bae4f3491c0ec1ea8ee6ce035ff"},{"url":"https://git.kernel.org/stable/c/59c6dcc5dd9dafe764ca0d40525933b2be69b059"},{"url":"https://git.kernel.org/stable/c/80af1bde97d5a85ad6f2c40ca894ccc8fa75a27a"},{"url":"https://git.kernel.org/stable/c/517404e157395d0f8da125ca956c566895dfcd06"},{"url":"https://git.kernel.org/stable/c/4722d06b2907585074252061b1024a696c1cfc23"},{"url":"https://git.kernel.org/stable/c/23a0be6a84a38ac169eeab49017934e8e27c65f0"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - ksmbd_conn_handler_loop() receives the compound request over TCP/445, and __process_request() dispatches its non-first SMB2 SESSION_SETUP to smb2_sess_setup() and krb5_authenticate(). The SESSION_SETUP SecurityBuffer carries the Kerberos AP-REQ that produces the AP-REP copied by the patched path.\nAC:L - The same authenticated peer can create directory entries, request a sized QUERY_DIRECTORY response, and place SESSION_SETUP later in the compound, controlling next_smb2_rsp_hdr_off before supplying its valid AP-REQ; no race or external actor is required.\nPR:L - ksmbd_krb5_authenticate() checks KSMBD_USER_FLAG_OK before its length check and memcpy; ksmbd.mountd sets it only after krb5_rd_req() accepts the AP-REQ and usm_handle_login_request() recognizes the account. An ordinary valid Kerberos account suffices, but an unauthenticated peer cannot reach the write.\nUI:N - The peer opens the session, prepares the prior compound response, and sends the Kerberos SESSION_SETUP itself; no victim user must open, mount, or approve anything.\nS:U - ksmbd_krb5_authenticate() corrupts memory adjacent to the host kernel's response_buf allocation; this remains within the same kernel security authority and crosses no VM, IOMMU, or sandbox boundary.\nC:H - The AP-REP memcpy in ksmbd_krb5_authenticate() can overrun response_buf and corrupt adjacent heap objects; exploitable kernel heap corruption can be converted into a memory-read primitive exposing arbitrary kernel data.\nI:H - The memcpy writes resp->spnego_blob_len AP-REP bytes beyond response_buf into adjacent kernel heap memory, enabling corruption of object metadata or control data and potential kernel code execution.\nA:H - Writing the AP-REP beyond response_buf can corrupt adjacent allocations or allocator metadata and trigger KASAN, an oops, or a kernel panic; the authenticated SMB peer can repeat the compound request."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:41:38.581Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.145","versionEndExcluding":"5.15.224"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.40","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.12.114"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.18.58"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"7.2.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"7.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4.5"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}