mtd: parsers: Fix memory leak in mtd_parser_tplink_safeloader_parse()
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.75, 6.18.14, 6.19.4, 6.6.128
- CVEs
- CVE-2026-45921
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 03:40 UTC · Revision 1
Source evidence
mtd: parsers: Fix memory leak in mtd_parser_tplink_safeloader_parse()
core-osv · Original sourcePublished 27 May 2026, 12:17 UTC
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.
osv:CVE-2026-45921
Kernel
Fixed versions: 6.6.128, 6.12.75, 6.18.14, 6.19.4
Complete source record
{
"id": "c8aa268a84bfe546a17c59ee633896b26267405a6c1315009d847fb2bbf72648",
"url": "https://osv.dev/vulnerability/CVE-2026-45921",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "mtd: parsers: Fix memory leak in mtd_parser_tplink_safeloader_parse()",
"summary": "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.",
"evidence": "osv:CVE-2026-45921",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.6.128",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.75",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.14",
"evidence": "/affected/1/ranges"
},
{
"value": "6.19.4",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-45921",
"aliases": [
"CVE-2026-45921"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "00a3588084bee6f37bb2b1d343f96900cfe049bc"
},
{
"fixed": "0f5e62ea5c43146eacdc6861cb1022ffae1b79bc"
},
{
"fixed": "e97f5fac8ce9a6b9ec724c97d86b0985e915fdca"
},
{
"fixed": "ec121ad626c319085f6d40a52cd04e99b4554926"
},
{
"fixed": "971e9c53aed82f17a9c6a65daa4e21cc15eba5b1"
},
{
"fixed": "980ce2b02dd06a4fdf5fee38b2e14becf9cf7b8b"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-45921.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.128"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.75"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.14"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "6.19.4"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-45921.json"
}
}
],
"modified": "2026-10-28T02:30:25.772453559Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/0f5e62ea5c43146eacdc6861cb1022ffae1b79bc",
"https://git.kernel.org/stable/c/971e9c53aed82f17a9c6a65daa4e21cc15eba5b1",
"https://git.kernel.org/stable/c/980ce2b02dd06a4fdf5fee38b2e14becf9cf7b8b",
"https://git.kernel.org/stable/c/e97f5fac8ce9a6b9ec724c97d86b0985e915fdca",
"https://git.kernel.org/stable/c/ec121ad626c319085f6d40a52cd04e99b4554926",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45921.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-45921",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45921.json"
}
},
"related_cves": [
{
"value": "CVE-2026-45921",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 492242,
"published_at": "2026-05-27T12:17:40.032+00:00"
}