{"api_version":"1","generated_at":"2026-12-01T14:01:17+00:00","cve":"CVE-2026-138921","urls":{"html":"https://cve.report/CVE-2026-138921","api":"https://cve.report/api/cve/CVE-2026-138921.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138921","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138921"},"summary":{"title":"crypto: caam - fix double-free in caam_rsa_set_priv_key_form()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: caam - fix double-free in caam_rsa_set_priv_key_form()\n\ncaam_rsa_set_priv_key_form() frees the partially allocated key\ncomponents (p, q, tmp1, tmp2, dp, dq) with kfree_sensitive() on its\nerror path, but does not set those pointers to NULL afterward.\n\nWhen the function returns an error, caam_rsa_set_priv_key() jumps to\nits err label and calls caam_rsa_free_key(), which frees all of those\nsame pointers again, resulting in a double-free.\n\nThis is reachable when the allocation of q, tmp1, tmp2, dp, dq or qinv\nfails, e.g. under memory pressure, or for a malformed key whose CRT\nmembers decode to zero length and make caam_read_rsa_crt() return NULL.\n\nSet each pointer to NULL right after freeing it so that the subsequent\ncaam_rsa_free_key() call becomes a no-op for the already-freed fields.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:51","updated_at":"2026-12-01 06:17:31"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/f3e503a31d3cfdc8fae1baeb0ad5ba8471ceea9d","name":"https://git.kernel.org/stable/c/f3e503a31d3cfdc8fae1baeb0ad5ba8471ceea9d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e7a5cea8804f1210fe45c3a0281b11943c58553f","name":"https://git.kernel.org/stable/c/e7a5cea8804f1210fe45c3a0281b11943c58553f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/523eb58df5c11531a99f2e75d08e10f20cc28565","name":"https://git.kernel.org/stable/c/523eb58df5c11531a99f2e75d08e10f20cc28565","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a91d9346a70b68f77884cba9d9ec3b70f96bf9d2","name":"https://git.kernel.org/stable/c/a91d9346a70b68f77884cba9d9ec3b70f96bf9d2","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a5e1e36dace783c8d1688a299a3919f4d624217d","name":"https://git.kernel.org/stable/c/a5e1e36dace783c8d1688a299a3919f4d624217d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ad78e2cd8b4dde0b8c52bb5227e09faf3f49b939","name":"https://git.kernel.org/stable/c/ad78e2cd8b4dde0b8c52bb5227e09faf3f49b939","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/35b3176839fa1842ae1a6e3b2bbbc37d34237614","name":"https://git.kernel.org/stable/c/35b3176839fa1842ae1a6e3b2bbbc37d34237614","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/068e85ed81838a9d98c3018d532402dbd360fd1f","name":"https://git.kernel.org/stable/c/068e85ed81838a9d98c3018d532402dbd360fd1f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138921","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138921","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 52e26d77b8b3de2e9ed6c7126f68e04cad5fe852 068e85ed81838a9d98c3018d532402dbd360fd1f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 52e26d77b8b3de2e9ed6c7126f68e04cad5fe852 35b3176839fa1842ae1a6e3b2bbbc37d34237614 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 52e26d77b8b3de2e9ed6c7126f68e04cad5fe852 a5e1e36dace783c8d1688a299a3919f4d624217d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 52e26d77b8b3de2e9ed6c7126f68e04cad5fe852 ad78e2cd8b4dde0b8c52bb5227e09faf3f49b939 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 52e26d77b8b3de2e9ed6c7126f68e04cad5fe852 e7a5cea8804f1210fe45c3a0281b11943c58553f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 52e26d77b8b3de2e9ed6c7126f68e04cad5fe852 f3e503a31d3cfdc8fae1baeb0ad5ba8471ceea9d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 52e26d77b8b3de2e9ed6c7126f68e04cad5fe852 523eb58df5c11531a99f2e75d08e10f20cc28565 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 52e26d77b8b3de2e9ed6c7126f68e04cad5fe852 a91d9346a70b68f77884cba9d9ec3b70f96bf9d2 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.13","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.13 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/crypto/caam/caampkc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"068e85ed81838a9d98c3018d532402dbd360fd1f","status":"affected","version":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","versionType":"git"},{"lessThan":"35b3176839fa1842ae1a6e3b2bbbc37d34237614","status":"affected","version":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","versionType":"git"},{"lessThan":"a5e1e36dace783c8d1688a299a3919f4d624217d","status":"affected","version":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","versionType":"git"},{"lessThan":"ad78e2cd8b4dde0b8c52bb5227e09faf3f49b939","status":"affected","version":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","versionType":"git"},{"lessThan":"e7a5cea8804f1210fe45c3a0281b11943c58553f","status":"affected","version":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","versionType":"git"},{"lessThan":"f3e503a31d3cfdc8fae1baeb0ad5ba8471ceea9d","status":"affected","version":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","versionType":"git"},{"lessThan":"523eb58df5c11531a99f2e75d08e10f20cc28565","status":"affected","version":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","versionType":"git"},{"lessThan":"a91d9346a70b68f77884cba9d9ec3b70f96bf9d2","status":"affected","version":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/crypto/caam/caampkc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.13"},{"lessThan":"4.13","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"4.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.13","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: caam - fix double-free in caam_rsa_set_priv_key_form()\n\ncaam_rsa_set_priv_key_form() frees the partially allocated key\ncomponents (p, q, tmp1, tmp2, dp, dq) with kfree_sensitive() on its\nerror path, but does not set those pointers to NULL afterward.\n\nWhen the function returns an error, caam_rsa_set_priv_key() jumps to\nits err label and calls caam_rsa_free_key(), which frees all of those\nsame pointers again, resulting in a double-free.\n\nThis is reachable when the allocation of q, tmp1, tmp2, dp, dq or qinv\nfails, e.g. under memory pressure, or for a malformed key whose CRT\nmembers decode to zero length and make caam_read_rsa_crt() return NULL.\n\nSet each pointer to NULL right after freeing it so that the subsequent\ncaam_rsa_free_key() call becomes a no-op for the already-freed fields."}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"AV:L - The malformed RSA key is local data: a process adds a PKCS#8 blob with add_key(\"asymmetric\") and then calls keyctl(KEYCTL_PKEY_QUERY), and software_key_query() passes it to crypto_akcipher_set_priv_key() on rsa-caam. No network protocol carries the key, and AF_ALG has no akcipher interface.\nAC:L - On a CAAM/PKHA system with the PKCS#8 parser available, a key whose prime2 or a CRT field is INTEGER 0 passes rsa_get_q()/rsa_get_dp(), but caam_read_raw_data()/caam_read_rsa_crt() return NULL. caam_rsa_set_priv_key_form() then frees p (and more) and caam_rsa_free_key() frees them again, every time, with no race and no need for memory pressure.\nPR:L - Any ordinary user can add an asymmetric key to their own session keyring and query it; keyctl_pkey_params_get() only requires KEY_NEED_SEARCH on a key the caller owns. No capability, user namespace or root is needed.\nUI:N - The attacker performs the add_key and keyctl calls with their own key. No other user or administrator has to do anything at the time of the attack.\nS:U - The double free corrupts the kernel's own slab allocator, inside the same kernel that runs the CAAM driver. Turning it into root is an ordinary kernel privilege escalation and crosses no VM or IOMMU boundary.\nC:H - caam_rsa_free_key() frees key->d, whose size the attacker chooses, between the two kfree_sensitive(key->p) calls, which gets past SLUB's simple double-free check. The object ends up on the freelist twice, so two later allocations overlap, and that can be used to read kernel memory.\nI:H - The same overlap lets the attacker write through one object into another, for example credentials or function-pointer structures, which can lead to arbitrary kernel write and control-flow hijack. Allocation sizes follow the p/q/d lengths in the key, and the attack can be repeated.\nA:H - Even without exploitation, freeing p twice either hits the SLAB_FREELIST_HARDENED BUG_ON or corrupts the freelist, and the kernel later oopses or panics. Any local user can repeat it with keyctl queries."}]}],"providerMetadata":{"dateUpdated":"2026-12-01T05:40:41.218Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/068e85ed81838a9d98c3018d532402dbd360fd1f"},{"url":"https://git.kernel.org/stable/c/35b3176839fa1842ae1a6e3b2bbbc37d34237614"},{"url":"https://git.kernel.org/stable/c/a5e1e36dace783c8d1688a299a3919f4d624217d"},{"url":"https://git.kernel.org/stable/c/ad78e2cd8b4dde0b8c52bb5227e09faf3f49b939"},{"url":"https://git.kernel.org/stable/c/e7a5cea8804f1210fe45c3a0281b11943c58553f"},{"url":"https://git.kernel.org/stable/c/f3e503a31d3cfdc8fae1baeb0ad5ba8471ceea9d"},{"url":"https://git.kernel.org/stable/c/523eb58df5c11531a99f2e75d08e10f20cc28565"},{"url":"https://git.kernel.org/stable/c/a91d9346a70b68f77884cba9d9ec3b70f96bf9d2"}],"title":"crypto: caam - fix double-free in caam_rsa_set_priv_key_form()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138921","datePublished":"2026-11-30T13:26:13.456Z","dateReserved":"2026-11-30T13:22:15.903Z","dateUpdated":"2026-12-01T05:40:41.218Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:51","lastModifiedDate":"2026-12-01 06:17:31","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138921","Ordinal":"1","Title":"crypto: caam - fix double-free in caam_rsa_set_priv_key_form()","CVE":"CVE-2026-138921","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138921","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: caam - fix double-free in caam_rsa_set_priv_key_form()\n\ncaam_rsa_set_priv_key_form() frees the partially allocated key\ncomponents (p, q, tmp1, tmp2, dp, dq) with kfree_sensitive() on its\nerror path, but does not set those pointers to NULL afterward.\n\nWhen the function returns an error, caam_rsa_set_priv_key() jumps to\nits err label and calls caam_rsa_free_key(), which frees all of those\nsame pointers again, resulting in a double-free.\n\nThis is reachable when the allocation of q, tmp1, tmp2, dp, dq or qinv\nfails, e.g. under memory pressure, or for a malformed key whose CRT\nmembers decode to zero length and make caam_read_rsa_crt() return NULL.\n\nSet each pointer to NULL right after freeing it so that the subsequent\ncaam_rsa_free_key() call becomes a no-op for the already-freed fields.","Type":"Description","Title":"crypto: caam - fix double-free in caam_rsa_set_priv_key_form()"}]}}}