# CVE-2026-45950: crypto: starfive - Fix memory leak in starfive_aes_aead_do_one_req()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.12%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-05-27T12:18:06.482Z
- Modified: 2026-06-17T10:52:46.937Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

crypto: starfive - Fix memory leak in starfive_aes_aead_do_one_req()

The starfive_aes_aead_do_one_req() function allocates rctx->adata with
kzalloc() but fails to free it if sg_copy_to_buffer() or
starfive_aes_hw_init() fails, which lead to memory leaks.

Since rctx->adata is unconditionally freed after the write_adata
operations, ensure consistent cleanup by freeing the allocation in these
earlier error paths as well.

Compile tested only. Issue found using a prototype static analysis tool
and code review.

(As written by CVE List.)

## Affected

- Linux Linux: from 7467147ef9bf42d1ea5b3314c7a05cd542b3518e before 38d80307decc1132626a30e2a62af734630ecca5; from 7467147ef9bf42d1ea5b3314c7a05cd542b3518e before 4869d0e4e48a5301b267d359b2561c4080791a55; from 7467147ef9bf42d1ea5b3314c7a05cd542b3518e before 5f2c964a058581e1557c32d5de651c67a80438a7; from 7467147ef9bf42d1ea5b3314c7a05cd542b3518e before ccb679fdae2e62ed92fd9acb25ed809c0226fcc6; 6.10 (not affected: before 6.10; from 6.12.75 up to 6.12.*; from 6.18.14 up to 6.18.*; from 6.19.4 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.10 before 6.12.75; from 6.13 before 6.18.14; from 6.19 before 6.19.4

## References

- <https://git.kernel.org/stable/c/38d80307decc1132626a30e2a62af734630ecca5> (patch)
- <https://git.kernel.org/stable/c/4869d0e4e48a5301b267d359b2561c4080791a55> (patch)
- <https://git.kernel.org/stable/c/5f2c964a058581e1557c32d5de651c67a80438a7> (patch)
- <https://git.kernel.org/stable/c/ccb679fdae2e62ed92fd9acb25ed809c0226fcc6> (patch)

## Sources

- CVE List: [CVE-2026-45950](https://www.cve.org/CVERecord?id=CVE-2026-45950), CVE Terms of Use, modified 2026-05-27
- NVD: [CVE-2026-45950](https://nvd.nist.gov/vuln/detail/CVE-2026-45950), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-45950 · Whole record: https://cve.day/CVE-2026-45950.json · Rebuilt by cve.day 2026-11-25T22:59:22.518Z
