{"id":"CVE-2026-143113","state":"PUBLISHED","title":"crypto: caam - reject overlong RSA CRT parameters","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: caam - reject overlong RSA CRT parameters\n\ncaam_read_rsa_crt() right-aligns dP, dQ, and qInv in buffers sized\nfrom the corresponding prime. rsa_parse_priv_key() only bounds these\nintegers against n, so a malformed key can provide, for example, a\ntwo-byte dP with a one-byte p. dstlen - nbytes then underflows and\nmemcpy() writes outside the allocation during set_priv_key(). KASAN\nreports a slab-out-of-bounds write in caam_read_rsa_crt().\n\nReject empty or overlong CRT parameters after stripping leading zeros.\nqInv is consumed by CAAM as a p-sized value, so size it from p rather\nthan q to match the DMA mapping in set_rsa_priv_f3_pdb(). Let the\ntop-level key cleanup handle partial form-3 allocations and return the\nspecific error to the caller.\n\nAlso test nbytes before dereferencing it while stripping zeros, so an\nall-zero integer does not read one byte beyond its input.","publishedAt":"2026-12-03T09:19:27.623Z","updatedAt":"2026-12-03T09:19:27.623Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4a651b122adb8d3a9cb1c5dddfd63e708ee9bdd2","status":"affected","lessThan":"433f6e7377f62a16287a2720a76e70f56b31b5ba","versionType":"git"},{"version":"4a651b122adb8d3a9cb1c5dddfd63e708ee9bdd2","status":"affected","lessThan":"c1bb0e19f4a96d26f3bc5033defd4934ef5c4521","versionType":"git"},{"version":"4a651b122adb8d3a9cb1c5dddfd63e708ee9bdd2","status":"affected","lessThan":"49915365ba3f6bb99f79bf81052166ea3b1e1cf6","versionType":"git"},{"version":"4a651b122adb8d3a9cb1c5dddfd63e708ee9bdd2","status":"affected","lessThan":"828c3b265b6df877dced3dde56ea41daa2e6181e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/caam/caampkc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.13","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/caam/caampkc.c"]}],"references":["https://git.kernel.org/stable/c/433f6e7377f62a16287a2720a76e70f56b31b5ba","https://git.kernel.org/stable/c/c1bb0e19f4a96d26f3bc5033defd4934ef5c4521","https://git.kernel.org/stable/c/49915365ba3f6bb99f79bf81052166ea3b1e1cf6","https://git.kernel.org/stable/c/828c3b265b6df877dced3dde56ea41daa2e6181e"],"weaknesses":[],"ingestedAt":"2026-12-03T09:40:06.136Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143113.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143113","state":"PUBLISHED","datePublished":"2026-12-03T09:19:27.623Z","dateUpdated":"2026-12-03T09:19:27.623Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.350Z"},"containers":{"cna":{"title":"crypto: caam - reject overlong RSA CRT parameters","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: caam - reject overlong RSA CRT parameters\n\ncaam_read_rsa_crt() right-aligns dP, dQ, and qInv in buffers sized\nfrom the corresponding prime. rsa_parse_priv_key() only bounds these\nintegers against n, so a malformed key can provide, for example, a\ntwo-byte dP with a one-byte p. dstlen - nbytes then underflows and\nmemcpy() writes outside the allocation during set_priv_key(). KASAN\nreports a slab-out-of-bounds write in caam_read_rsa_crt().\n\nReject empty or overlong CRT parameters after stripping leading zeros.\nqInv is consumed by CAAM as a p-sized value, so size it from p rather\nthan q to match the DMA mapping in set_rsa_priv_f3_pdb(). Let the\ntop-level key cleanup handle partial form-3 allocations and return the\nspecific error to the caller.\n\nAlso test nbytes before dereferencing it while stripping zeros, so an\nall-zero integer does not read one byte beyond its input."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4a651b122adb8d3a9cb1c5dddfd63e708ee9bdd2","status":"affected","lessThan":"433f6e7377f62a16287a2720a76e70f56b31b5ba","versionType":"git"},{"version":"4a651b122adb8d3a9cb1c5dddfd63e708ee9bdd2","status":"affected","lessThan":"c1bb0e19f4a96d26f3bc5033defd4934ef5c4521","versionType":"git"},{"version":"4a651b122adb8d3a9cb1c5dddfd63e708ee9bdd2","status":"affected","lessThan":"49915365ba3f6bb99f79bf81052166ea3b1e1cf6","versionType":"git"},{"version":"4a651b122adb8d3a9cb1c5dddfd63e708ee9bdd2","status":"affected","lessThan":"828c3b265b6df877dced3dde56ea41daa2e6181e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/caam/caampkc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.13","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/caam/caampkc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/433f6e7377f62a16287a2720a76e70f56b31b5ba"},{"url":"https://git.kernel.org/stable/c/c1bb0e19f4a96d26f3bc5033defd4934ef5c4521"},{"url":"https://git.kernel.org/stable/c/49915365ba3f6bb99f79bf81052166ea3b1e1cf6"},{"url":"https://git.kernel.org/stable/c/828c3b265b6df877dced3dde56ea41daa2e6181e"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:19:27.623Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.13","versionEndExcluding":"7.4-rc3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}