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.
Published: 2026-05-27
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in the starfive_aes_aead_do_one_req() function of the Linux kernel’s crypto subsystem. An allocation for rctx->adata is made with kzalloc, but when sg_copy_to_buffer() or starfive_aes_hw_init() fails, the function does not free this memory. Because rctx->adata is always freed later only after a successful write_adata operation, an error path can leave the allocation unfreed, resulting in a memory leak. The weakness can lead to gradual degradation of system memory availability, potentially causing the kernel to experience out‑of‑memory conditions over time. The flaw is a classic resource management defect, identified as CWE‑401.

Affected Systems

All Linux kernel releases that include the starfive_aes_aead_do_one_req() implementation are affected, until a patch that removes the leak is applied. No specific vendor or version information is provided; the issue appears in upstream Linux kernel source that contains the starfive driver.

Risk and Exploitability

The exploitability of this fault is limited to local privileged processes that can load or manipulate the affected crypto module, as the code runs in kernel context. There is no documented remote attack vector. The EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog. Without a CVSS score, the severity assessment remains high, as memory exhaustion is a known critical problem in kernel code, but actual exploit risk is constrained by the lack of remote access or privilege escalation pathways.

Generated by OpenCVE AI on May 27, 2026 at 17:25 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a Linux kernel update that includes the corrected starfive_aes_aead_do_one_req() implementation.
  • Verify the kernel source at commit 38d80307decc1132626a30e2a62af734630ecca5 or later, which contains the memory‑free fix.
  • If an immediate kernel upgrade is not feasible, disable the starfive crypto module or add a defensive free() in the error paths if a custom patch is deployed.

Generated by OpenCVE AI on May 27, 2026 at 17:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 27 May 2026 14:15:00 +0000

Type Values Removed Values Added
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.
Title crypto: starfive - Fix memory leak in starfive_aes_aead_do_one_req()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-05-27T12:18:06.482Z

Reserved: 2026-05-13T15:03:33.088Z

Link: CVE-2026-45950

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-27T14:17:11.483

Modified: 2026-05-27T14:48:03.013

Link: CVE-2026-45950

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-27T21:00:13Z

Weaknesses

No weakness.