{"id":"CVE-2023-3865","state":"PUBLISHED","title":"ksmbd: fix out-of-bound read in smb2_write","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix out-of-bound read in smb2_write\n\nksmbd_smb2_check_message doesn't validate hdr->NextCommand. If\n->NextCommand is bigger than Offset + Length of smb2 write, It will\nallow oversized smb2 write length. It will cause OOB read in smb2_write.","publishedAt":"2025-08-16T13:27:56.403Z","updatedAt":"2026-08-15T12:23:42.112Z","severity":{"score":8.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","status":"affected","lessThan":"3813eee5154d6a4c5875cb4444cb2b63bac8947f","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","status":"affected","lessThan":"c86211159bc3178b891e0d60e586a32c7b6a231b","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","status":"affected","lessThan":"58a9c41064df27632e780c5a3ae3e0e4284957d1","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","status":"affected","lessThan":"5fe7f7b78290638806211046a99f031ff26164e1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2misc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.121","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.36","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.3.10","status":"unaffected","lessThanOrEqual":"6.3.*","versionType":"semver"},{"version":"6.4","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/smb2misc.c"]}],"references":["https://git.kernel.org/stable/c/3813eee5154d6a4c5875cb4444cb2b63bac8947f","https://git.kernel.org/stable/c/c86211159bc3178b891e0d60e586a32c7b6a231b","https://git.kernel.org/stable/c/58a9c41064df27632e780c5a3ae3e0e4284957d1","https://git.kernel.org/stable/c/5fe7f7b78290638806211046a99f031ff26164e1"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:08.715Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/3xxx/CVE-2023-3865.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-3865","state":"PUBLISHED","datePublished":"2025-08-16T13:27:56.403Z","dateUpdated":"2026-08-15T12:23:42.112Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2023-07-24T14:52:38.053Z"},"containers":{"cna":{"title":"ksmbd: fix out-of-bound read in smb2_write","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix out-of-bound read in smb2_write\n\nksmbd_smb2_check_message doesn't validate hdr->NextCommand. If\n->NextCommand is bigger than Offset + Length of smb2 write, It will\nallow oversized smb2 write length. It will cause OOB read in smb2_write."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","status":"affected","lessThan":"3813eee5154d6a4c5875cb4444cb2b63bac8947f","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","status":"affected","lessThan":"c86211159bc3178b891e0d60e586a32c7b6a231b","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","status":"affected","lessThan":"58a9c41064df27632e780c5a3ae3e0e4284957d1","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","status":"affected","lessThan":"5fe7f7b78290638806211046a99f031ff26164e1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/smb2misc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.121","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.36","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.3.10","status":"unaffected","lessThanOrEqual":"6.3.*","versionType":"semver"},{"version":"6.4","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/smb2misc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/3813eee5154d6a4c5875cb4444cb2b63bac8947f"},{"url":"https://git.kernel.org/stable/c/c86211159bc3178b891e0d60e586a32c7b6a231b"},{"url":"https://git.kernel.org/stable/c/58a9c41064df27632e780c5a3ae3e0e4284957d1"},{"url":"https://git.kernel.org/stable/c/5fe7f7b78290638806211046a99f031ff26164e1"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":8.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - ksmbd is an in-kernel SMB server reachable over TCP/445; the bug is triggered by crafting SMB2 WRITE request fields (NextCommand/Length) sent from a remote SMB client.\nAC:L - The attacker fully controls NextCommand and Length in the SMB2 header/PDU and can reliably pass ksmbd_smb2_check_message by making them agree, with no race or other conditions outside attacker control.\nPR:L - smb2_write requires a valid SMB session, tree connect to a writable share, and an open file handle with write access; guest/basic share credentials suffice, but this is not a pre-authentication path.\nUI:N - Exploitation requires only attacker-sent SMB traffic; no victim user action such as opening a file or mounting a share is needed.\nS:U - Impact is confined to the host kernel running ksmbd; the vulnerability does not cross a VM, IOMMU, or other security authority boundary by itself.\nC:H - Oversized Length with a forged NextCommand causes smb2_write to kernel_write attacker-chosen lengths of memory past the request buffer into a share file the attacker can then read back, leaking large amounts of kernel memory (documented up to 64KiB).\nI:N - This is an out-of-bounds read only; it does not corrupt kernel memory or provide a write primitive into kernel structures.\nA:H - A large read past the kvmalloc'd request buffer can touch unmapped memory and cause a kernel oops/panic, or otherwise disrupt the ksmbd worker path."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-15T12:23:42.112Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.121"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.36"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.3.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.4"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}