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

mtd: parsers: Fix memory leak in mtd_parser_tplink_safeloader_parse()

The function mtd_parser_tplink_safeloader_parse() allocates buf via
mtd_parser_tplink_safeloader_read_table(). If the allocation for
parts[idx].name fails inside the loop, the code jumps to the err_free
label without freeing buf, leading to a memory leak.

Fix this by freeing the temporary buffer buf in the err_free label.

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

A flaw in the Linux kernel’s mtd_parser_tplink_safeloader_parse() function caused a memory leak when allocating the buffer used to parse a table. If the allocation for a table entry’s name fails, the code jumps to the error handling label without freeing the temporary buffer, leaving the kernel’s memory permanently allocated. Repeated exploitation via the tplink_safeloader parser can cause uncontrolled memory consumption, potentially leading to a kernel panic or degradation of system performance.

Affected Systems

The vulnerability applies to the Linux kernel globally; specific vendor and product information is limited to Linux kernel releases that include the tplink_safeloader parser. No affected version range is listed, but the issue was fixed by commits referenced in the provided kernel patch set.

Risk and Exploitability

No EPSS score or CVSS rating is provided, and the vulnerability is not listed in the CISA KEV catalog, indicating a low public exploitation probability. Attackers would need the ability to invoke the tplink_safeloader parser repeatedly on the target system, which typically requires local or privileged access. The primary risk is denial of service due to kernel memory exhaustion rather than remote code execution.

Generated by OpenCVE AI on May 27, 2026 at 16:30 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Install the kernel update that includes the mtd_parser_tplink_safeloader_parse() memory leak fix, using the documentation of the referenced kernel commits.
  • If a kernel update cannot be applied immediately, manually patch the source tree with the commit changes and rebuild the kernel to eliminate the leak.
  • Disable the tplink_safeloader parser in kernel configuration (set CONFIG_TPLINK_SAFELOADER to n) if that functionality is not required, and rebuild the kernel.
  • Monitor system memory usage after applying the fix to verify the leak has been fully addressed.

Generated by OpenCVE AI on May 27, 2026 at 16:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 27 May 2026 16:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-754
CWE-757

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

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mtd: parsers: Fix memory leak in mtd_parser_tplink_safeloader_parse() The function mtd_parser_tplink_safeloader_parse() allocates buf via mtd_parser_tplink_safeloader_read_table(). If the allocation for parts[idx].name fails inside the loop, the code jumps to the err_free label without freeing buf, leading to a memory leak. Fix this by freeing the temporary buffer buf in the err_free label. Compile tested only. Issue found using a prototype static analysis tool and code review.
Title mtd: parsers: Fix memory leak in mtd_parser_tplink_safeloader_parse()
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:17:40.032Z

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

Link: CVE-2026-45921

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

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

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

Link: CVE-2026-45921

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-27T16:30:36Z

Weaknesses