{"id":"CVE-2025-38173","state":"PUBLISHED","title":"crypto: marvell/cesa - Handle zero-length skcipher requests","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: marvell/cesa - Handle zero-length skcipher requests\n\nDo not access random memory for zero-length skcipher requests.\nJust return 0.","publishedAt":"2025-07-03T08:36:10.969Z","updatedAt":"2026-08-05T12:00:04.161Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/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":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"32d3e8049a8b60f18c5c39f5931bfb1130ac11c9","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"c064ae2881d839709bd72d484d5f2af157f46024","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"e1cc69da619588b1488689fe3535a0ba75a2b0e7","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"78ea1ff6cb413a03ff6f7af4e28e24b4461a0965","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"5e9666ac8b94c978690f937d59170c5237bd2c45","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"7894694b5d5b2ecfd7fb081d6f60b9e169ab4d13","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"c9610dda42bd382a96f97e68825cb5f66cd9e1dc","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"8a4e047c6cc07676f637608a9dd675349b5de0a7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/marvell/cesa/cipher.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.2","versionType":"semver"},{"version":"5.4.295","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.239","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.186","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.142","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.94","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.34","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.3","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/marvell/cesa/cipher.c"]}],"references":["https://git.kernel.org/stable/c/32d3e8049a8b60f18c5c39f5931bfb1130ac11c9","https://git.kernel.org/stable/c/c064ae2881d839709bd72d484d5f2af157f46024","https://git.kernel.org/stable/c/e1cc69da619588b1488689fe3535a0ba75a2b0e7","https://git.kernel.org/stable/c/78ea1ff6cb413a03ff6f7af4e28e24b4461a0965","https://git.kernel.org/stable/c/5e9666ac8b94c978690f937d59170c5237bd2c45","https://git.kernel.org/stable/c/7894694b5d5b2ecfd7fb081d6f60b9e169ab4d13","https://git.kernel.org/stable/c/c9610dda42bd382a96f97e68825cb5f66cd9e1dc","https://git.kernel.org/stable/c/8a4e047c6cc07676f637608a9dd675349b5de0a7","https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38173.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38173","state":"PUBLISHED","datePublished":"2025-07-03T08:36:10.969Z","dateUpdated":"2026-08-05T12:00:04.161Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.991Z"},"containers":{"cna":{"title":"crypto: marvell/cesa - Handle zero-length skcipher requests","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: marvell/cesa - Handle zero-length skcipher requests\n\nDo not access random memory for zero-length skcipher requests.\nJust return 0."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"32d3e8049a8b60f18c5c39f5931bfb1130ac11c9","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"c064ae2881d839709bd72d484d5f2af157f46024","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"e1cc69da619588b1488689fe3535a0ba75a2b0e7","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"78ea1ff6cb413a03ff6f7af4e28e24b4461a0965","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"5e9666ac8b94c978690f937d59170c5237bd2c45","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"7894694b5d5b2ecfd7fb081d6f60b9e169ab4d13","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"c9610dda42bd382a96f97e68825cb5f66cd9e1dc","versionType":"git"},{"version":"f63601fd616ab370774fa00ea10bcaaa9e48e84c","status":"affected","lessThan":"8a4e047c6cc07676f637608a9dd675349b5de0a7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/marvell/cesa/cipher.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.2","versionType":"semver"},{"version":"5.4.295","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.239","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.186","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.142","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.94","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.34","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.3","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/marvell/cesa/cipher.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/32d3e8049a8b60f18c5c39f5931bfb1130ac11c9"},{"url":"https://git.kernel.org/stable/c/c064ae2881d839709bd72d484d5f2af157f46024"},{"url":"https://git.kernel.org/stable/c/e1cc69da619588b1488689fe3535a0ba75a2b0e7"},{"url":"https://git.kernel.org/stable/c/78ea1ff6cb413a03ff6f7af4e28e24b4461a0965"},{"url":"https://git.kernel.org/stable/c/5e9666ac8b94c978690f937d59170c5237bd2c45"},{"url":"https://git.kernel.org/stable/c/7894694b5d5b2ecfd7fb081d6f60b9e169ab4d13"},{"url":"https://git.kernel.org/stable/c/c9610dda42bd382a96f97e68825cb5f66cd9e1dc"},{"url":"https://git.kernel.org/stable/c/8a4e047c6cc07676f637608a9dd675349b5de0a7"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The only trigger is a local `AF_ALG` socket (`algif_aead` with `authenc(...,cbc(aes))`) submitting an AAD-only request, or another in-kernel skcipher caller; the network consumers of `cbc(aes)` (IPsec ESP) explicitly reject `elen <= 0`, so no remote peer can drive `cryptlen == 0`.\nAC:L - The attacker directly and fully controls `req->cryptlen` by choosing the sendmsg payload length equal to the assoclen; the condition is deterministic with no race, memory-layout, or timing dependency.\nPR:L - Any unprivileged local user can open an `AF_ALG` socket and bind an `authenc(hmac(sha1),cbc(aes))` transform — no capabilities, no root, and no namespace tricks are required.\nUI:N - The attacker performs the entire sequence (socket/bind/sendmsg/recvmsg) on their own; no victim action or cooperation is involved.\nS:U - The faulty memory access and the resulting crash/leak are entirely within the kernel's own security authority on the same host; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The driver reads memory it never validated for a zero-length request (\"Do not access random memory\"), and on the non-TDMA path returns stale CESA SRAM contents — leftover IV/crypto state from a previous, potentially different-security-context operation — straight back into the caller's user-visible IV buffer.\nI:H - The unvalidated zero-length request is still programmed into a DMA-capable crypto engine with a zero-length descriptor and `nents == 0` scatterlists, so the out-of-contract memory access is not read-only and the resulting corrupted state is written back into caller buffers; the higher value is taken given the ambiguity of the \"random memory\" access direction.\nA:H - On the common TDMA-equipped CESA parts, `dma_map_sg()` with `nents == 0` returns 0 and trips `WARN_ON_ONCE()` in `__dma_map_sg_attrs()`, producing a kernel splat that becomes a full panic under `panic_on_warn`, and the zero-length descriptor handed to the engine leaves the hardware in an undefined state."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:00:04.161Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"5.4.295"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"5.10.239"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"5.15.186"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.1.142"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.6.94"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.12.34"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.15.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T17:34:59.620Z"}}]}}}