mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file
In case of invalid INI file mlxsw_linecard_types_init() deallocates memory but doesn't reset pointer to NULL and returns 0. In case of any error occurred after mlxsw_linecard_types_init() call, mlxsw_linecards_init() calls mlxsw_linecard_types_fini() which performs memory deallocation again.
Add pointer reset to NULL.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
From the CVE record · Linux
The Linux kernel's mlxsw linecard initialization can free the same memory twice if it processes an invalid INI file and a later initialization error occurs. The input does not establish how an attacker could trigger these conditions or whether access or user interaction is required.
Engineers running Linux kernels with mlxsw linecard support should check their kernel versions; affected versions were not provided.