{"id":"CVE-2026-45950","state":"PUBLISHED","title":"crypto: starfive - Fix memory leak in starfive_aes_aead_do_one_req()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: starfive - Fix memory leak in starfive_aes_aead_do_one_req()\n\nThe starfive_aes_aead_do_one_req() function allocates rctx->adata with\nkzalloc() but fails to free it if sg_copy_to_buffer() or\nstarfive_aes_hw_init() fails, which lead to memory leaks.\n\nSince rctx->adata is unconditionally freed after the write_adata\noperations, ensure consistent cleanup by freeing the allocation in these\nearlier error paths as well.\n\nCompile tested only. Issue found using a prototype static analysis tool\nand code review.","publishedAt":"2026-05-27T12:18:06.482Z","updatedAt":"2026-05-27T12:18:06.482Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7467147ef9bf42d1ea5b3314c7a05cd542b3518e","status":"affected","lessThan":"38d80307decc1132626a30e2a62af734630ecca5","versionType":"git"},{"version":"7467147ef9bf42d1ea5b3314c7a05cd542b3518e","status":"affected","lessThan":"4869d0e4e48a5301b267d359b2561c4080791a55","versionType":"git"},{"version":"7467147ef9bf42d1ea5b3314c7a05cd542b3518e","status":"affected","lessThan":"5f2c964a058581e1557c32d5de651c67a80438a7","versionType":"git"},{"version":"7467147ef9bf42d1ea5b3314c7a05cd542b3518e","status":"affected","lessThan":"ccb679fdae2e62ed92fd9acb25ed809c0226fcc6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/starfive/jh7110-aes.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.10","versionType":"semver"},{"version":"6.12.75","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.14","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.4","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/starfive/jh7110-aes.c"]}],"references":["https://git.kernel.org/stable/c/38d80307decc1132626a30e2a62af734630ecca5","https://git.kernel.org/stable/c/4869d0e4e48a5301b267d359b2561c4080791a55","https://git.kernel.org/stable/c/5f2c964a058581e1557c32d5de651c67a80438a7","https://git.kernel.org/stable/c/ccb679fdae2e62ed92fd9acb25ed809c0226fcc6"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/45xxx/CVE-2026-45950.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-45950","state":"PUBLISHED","datePublished":"2026-05-27T12:18:06.482Z","dateUpdated":"2026-05-27T12:18:06.482Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-05-13T15:03:33.088Z"},"containers":{"cna":{"title":"crypto: starfive - Fix memory leak in starfive_aes_aead_do_one_req()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: starfive - Fix memory leak in starfive_aes_aead_do_one_req()\n\nThe starfive_aes_aead_do_one_req() function allocates rctx->adata with\nkzalloc() but fails to free it if sg_copy_to_buffer() or\nstarfive_aes_hw_init() fails, which lead to memory leaks.\n\nSince rctx->adata is unconditionally freed after the write_adata\noperations, ensure consistent cleanup by freeing the allocation in these\nearlier error paths as well.\n\nCompile tested only. Issue found using a prototype static analysis tool\nand code review."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7467147ef9bf42d1ea5b3314c7a05cd542b3518e","status":"affected","lessThan":"38d80307decc1132626a30e2a62af734630ecca5","versionType":"git"},{"version":"7467147ef9bf42d1ea5b3314c7a05cd542b3518e","status":"affected","lessThan":"4869d0e4e48a5301b267d359b2561c4080791a55","versionType":"git"},{"version":"7467147ef9bf42d1ea5b3314c7a05cd542b3518e","status":"affected","lessThan":"5f2c964a058581e1557c32d5de651c67a80438a7","versionType":"git"},{"version":"7467147ef9bf42d1ea5b3314c7a05cd542b3518e","status":"affected","lessThan":"ccb679fdae2e62ed92fd9acb25ed809c0226fcc6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/starfive/jh7110-aes.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.10","versionType":"semver"},{"version":"6.12.75","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.14","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.4","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/starfive/jh7110-aes.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/38d80307decc1132626a30e2a62af734630ecca5"},{"url":"https://git.kernel.org/stable/c/4869d0e4e48a5301b267d359b2561c4080791a55"},{"url":"https://git.kernel.org/stable/c/5f2c964a058581e1557c32d5de651c67a80438a7"},{"url":"https://git.kernel.org/stable/c/ccb679fdae2e62ed92fd9acb25ed809c0226fcc6"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-27T12:18:06.482Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"6.12.75"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"6.18.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"6.19.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"7.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}