{"id":"CVE-2023-4515","state":"PUBLISHED","title":"ksmbd: validate command request size","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: validate command request size\n\nIn commit 2b9b8f3b68ed (\"ksmbd: validate command payload size\"), except\nfor SMB2_OPLOCK_BREAK_HE command, the request size of other commands\nis not checked, it's not expected. Fix it by add check for request\nsize of other commands.","publishedAt":"2025-08-16T13:25:50.562Z","updatedAt":"2026-08-05T09:09:51.240Z","severity":{"score":9.1,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/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":"35f450f54dca1519bb24faacd0428db09f89a11f","status":"affected","lessThan":"595679098bdcdbfbba91ebe07a2f7f208df93870","versionType":"git"},{"version":"9650cf70ec9d94ff34daa088b643229231723c26","status":"affected","lessThan":"c6bef3bc30fd4a175aef846b7d928a6c40d091cd","versionType":"git"},{"version":"2b9b8f3b68edb3d67d79962f02e26dbb5ae3808d","status":"affected","lessThan":"ff7236b66d69582f90cf5616e63cfc3dc18142bb","versionType":"git"},{"version":"2b9b8f3b68edb3d67d79962f02e26dbb5ae3808d","status":"affected","lessThan":"5aa4fda5aa9c2a5a7bac67b4a12b089ab81fee3c","versionType":"git"},{"version":"768caf4019f0391c0b6452afe34cea1704133f7b","status":"affected","versionType":"git"},{"version":"5.15.121","status":"affected","lessThan":"5.15.127","versionType":"semver"},{"version":"6.1.36","status":"affected","lessThan":"6.1.46","versionType":"semver"},{"version":"6.3.10","status":"affected","lessThan":"6.4","versionType":"semver"}],"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":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"5.15.127","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.46","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.4.11","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5","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/595679098bdcdbfbba91ebe07a2f7f208df93870","https://git.kernel.org/stable/c/c6bef3bc30fd4a175aef846b7d928a6c40d091cd","https://git.kernel.org/stable/c/ff7236b66d69582f90cf5616e63cfc3dc18142bb","https://git.kernel.org/stable/c/5aa4fda5aa9c2a5a7bac67b4a12b089ab81fee3c"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/4xxx/CVE-2023-4515.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-4515","state":"PUBLISHED","datePublished":"2025-08-16T13:25:50.562Z","dateUpdated":"2026-08-05T09:09:51.240Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2023-08-24T10:34:48.702Z"},"containers":{"cna":{"title":"ksmbd: validate command request size","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: validate command request size\n\nIn commit 2b9b8f3b68ed (\"ksmbd: validate command payload size\"), except\nfor SMB2_OPLOCK_BREAK_HE command, the request size of other commands\nis not checked, it's not expected. Fix it by add check for request\nsize of other commands."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"35f450f54dca1519bb24faacd0428db09f89a11f","status":"affected","lessThan":"595679098bdcdbfbba91ebe07a2f7f208df93870","versionType":"git"},{"version":"9650cf70ec9d94ff34daa088b643229231723c26","status":"affected","lessThan":"c6bef3bc30fd4a175aef846b7d928a6c40d091cd","versionType":"git"},{"version":"2b9b8f3b68edb3d67d79962f02e26dbb5ae3808d","status":"affected","lessThan":"ff7236b66d69582f90cf5616e63cfc3dc18142bb","versionType":"git"},{"version":"2b9b8f3b68edb3d67d79962f02e26dbb5ae3808d","status":"affected","lessThan":"5aa4fda5aa9c2a5a7bac67b4a12b089ab81fee3c","versionType":"git"},{"version":"768caf4019f0391c0b6452afe34cea1704133f7b","status":"affected","versionType":"git"},{"version":"5.15.121","status":"affected","lessThan":"5.15.127","versionType":"semver"},{"version":"6.1.36","status":"affected","lessThan":"6.1.46","versionType":"semver"},{"version":"6.3.10","status":"affected","lessThan":"6.4","versionType":"semver"}],"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":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"5.15.127","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.46","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.4.11","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5","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/595679098bdcdbfbba91ebe07a2f7f208df93870"},{"url":"https://git.kernel.org/stable/c/c6bef3bc30fd4a175aef846b7d928a6c40d091cd"},{"url":"https://git.kernel.org/stable/c/ff7236b66d69582f90cf5616e63cfc3dc18142bb"},{"url":"https://git.kernel.org/stable/c/5aa4fda5aa9c2a5a7bac67b4a12b089ab81fee3c"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","baseScore":9.1,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable code is in ksmbd (fs/smb/server/), the in-kernel SMB server reached over TCP/445; a remote peer triggers it by sending a crafted SMB2 PDU that fails StructureSize2 validation.\nAC:L - An attacker fully controls StructureSize2 and the RFC1002 PDU length and can reliably send a short pre-auth SESSION_SETUP (e.g. StructureSize2=1 with pdu_size=68) that passes the incomplete check and OOBs in smb2_get_data_area_len; no race or external condition is required.\nPR:N - ksmbd_smb2_check_message runs for SMB2_NEGOTIATE, SMB2_SESSION_SETUP, and SMB2_ECHO, which smb2_check_user_session explicitly allows without a session, so the OOB is reachable before any credential verification.\nUI:N - Exploitation requires only attacker-sent SMB2 packets to a listening ksmbd instance; no victim user action is needed.\nS:U - Impact stays within the host kernel/ksmbd security authority (heap OOB read/DoS); this is not a VM escape, IOMMU bypass, or other cross-authority boundary change.\nC:H - Missing StructureSize2 matching allows slab out-of-bounds reads of fixed command fields (and subsequent use of those values as security-blob offset/length), which can disclose adjacent kernel heap contents under standard grooming; per guidance OOB reads score C:H.\nI:N - The defect is an out-of-bounds read from incomplete request-size validation; unlike related ksmbd heap overflows there is no demonstrated out-of-bounds write or direct integrity/control-flow primitive from this bug alone.\nA:H - The slab OOB read can fault under KFENCE/DEBUG_PAGEALLOC or panic under KASAN (as in the related KASAN report for the incomplete parent fix), and the attacker can retrigger it pre-authentication at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:09:51.240Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.121","versionEndExcluding":"5.15.127"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.36","versionEndExcluding":"6.1.46"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.4.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}