{"id":"CVE-2026-138921","aliases":["CVE-2026-138921"],"related":[],"kind":"vulnerability","state":"published","title":"crypto: caam - fix double-free in caam_rsa_set_priv_key_form()","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-30T13:26:13.456Z","modified":"2026-12-01T06:17:31.240Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","fixed":"068e85ed81838a9d98c3018d532402dbd360fd1f","status":"affected"},{"type":"git","introduced":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","fixed":"35b3176839fa1842ae1a6e3b2bbbc37d34237614","status":"affected"},{"type":"git","introduced":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","fixed":"a5e1e36dace783c8d1688a299a3919f4d624217d","status":"affected"},{"type":"git","introduced":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","fixed":"ad78e2cd8b4dde0b8c52bb5227e09faf3f49b939","status":"affected"},{"type":"git","introduced":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","fixed":"e7a5cea8804f1210fe45c3a0281b11943c58553f","status":"affected"},{"type":"git","introduced":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","fixed":"f3e503a31d3cfdc8fae1baeb0ad5ba8471ceea9d","status":"affected"},{"type":"git","introduced":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","fixed":"523eb58df5c11531a99f2e75d08e10f20cc28565","status":"affected"},{"type":"git","introduced":"52e26d77b8b3de2e9ed6c7126f68e04cad5fe852","fixed":"a91d9346a70b68f77884cba9d9ec3b70f96bf9d2","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.13","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/068e85ed81838a9d98c3018d532402dbd360fd1f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/35b3176839fa1842ae1a6e3b2bbbc37d34237614","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a5e1e36dace783c8d1688a299a3919f4d624217d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ad78e2cd8b4dde0b8c52bb5227e09faf3f49b939","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e7a5cea8804f1210fe45c3a0281b11943c58553f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f3e503a31d3cfdc8fae1baeb0ad5ba8471ceea9d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/523eb58df5c11531a99f2e75d08e10f20cc28565","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a91d9346a70b68f77884cba9d9ec3b70f96bf9d2","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138921","url":"https://www.cve.org/CVERecord?id=CVE-2026-138921","licence":"CVE Terms of Use","modified":"2026-12-01T05:40:41.218Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138921","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138921","licence":"Public domain","modified":"2026-12-01T06:17:31.240Z"}],"updatedAt":"2026-12-01T06:32:17.187Z","epss":{"score":0.00192,"percentile":0.09286,"date":"2026-12-01T12:00:22.000Z"}}