{"id":"CVE-2024-42138","summary":"mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file\n\nIn case of invalid INI file mlxsw_linecard_types_init() deallocates memory\nbut doesn't reset pointer to NULL and returns 0. In case of any error\noccurred after mlxsw_linecard_types_init() call, mlxsw_linecards_init()\ncalls mlxsw_linecard_types_fini() which performs memory deallocation again.\n\nAdd pointer reset to NULL.\n\nFound by Linux Verification Center (linuxtesting.org) with SVACE.","modified":"2026-04-02T12:17:50.805168Z","published":"2024-07-30T07:46:32.611Z","related":["MGASA-2024-0277","MGASA-2024-0278","SUSE-SU-2024:3194-1","SUSE-SU-2024:3195-1","SUSE-SU-2024:3383-1","SUSE-SU-2025:20044-1","SUSE-SU-2025:20047-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42138.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/8ce34dccbe8fa7d2ef86f2d8e7db2a9b67cabfc3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9af7437669b72f804fc4269f487528dbbed142a2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ab557f5cd993a3201b09593633d04b891263d5c0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f8b55a465b0e8a500179808166fe9420f5c091a1"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42138.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42138"},{"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":"b217127e5e4ee0ecfce7c5f84cfe082238123bda"},{"fixed":"ab557f5cd993a3201b09593633d04b891263d5c0"},{"fixed":"f8b55a465b0e8a500179808166fe9420f5c091a1"},{"fixed":"9af7437669b72f804fc4269f487528dbbed142a2"},{"fixed":"8ce34dccbe8fa7d2ef86f2d8e7db2a9b67cabfc3"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42138.json"}}],"schema_version":"1.7.5"}