{"id":"CVE-2026-45921","summary":"mtd: parsers: Fix memory leak in mtd_parser_tplink_safeloader_parse()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmtd: parsers: Fix memory leak in mtd_parser_tplink_safeloader_parse()\n\nThe function mtd_parser_tplink_safeloader_parse() allocates buf via\nmtd_parser_tplink_safeloader_read_table(). If the allocation for\nparts[idx].name fails inside the loop, the code jumps to the err_free\nlabel without freeing buf, leading to a memory leak.\n\nFix this by freeing the temporary buffer buf in the err_free label.\n\nCompile tested only. Issue found using a prototype static analysis tool\nand code review.","modified":"2026-06-26T11:56:18.250409467Z","published":"2026-05-27T12:17:40.032Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45921.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0f5e62ea5c43146eacdc6861cb1022ffae1b79bc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/971e9c53aed82f17a9c6a65daa4e21cc15eba5b1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/980ce2b02dd06a4fdf5fee38b2e14becf9cf7b8b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e97f5fac8ce9a6b9ec724c97d86b0985e915fdca"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ec121ad626c319085f6d40a52cd04e99b4554926"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45921.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45921"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"00a3588084bee6f37bb2b1d343f96900cfe049bc"},{"fixed":"0f5e62ea5c43146eacdc6861cb1022ffae1b79bc"},{"fixed":"e97f5fac8ce9a6b9ec724c97d86b0985e915fdca"},{"fixed":"ec121ad626c319085f6d40a52cd04e99b4554926"},{"fixed":"971e9c53aed82f17a9c6a65daa4e21cc15eba5b1"},{"fixed":"980ce2b02dd06a4fdf5fee38b2e14becf9cf7b8b"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-45921.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-45921.json"}}],"schema_version":"1.7.5"}