Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1F4F190497 for ; Tue, 30 Jul 2024 07:50:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325804; cv=none; b=qc9mFobLxI3i6EcMWTQn+dSaiFL6TQlYwLq8L1sNAj4A1tKIFQefvq3cJs2aDaROeLJPystV+GTrN688MOi9k68gyNY8jUw0IMxsoWp50mS6XSSUhrk3blyUfIH97RJ45XhLayVhif+WP96E9Nf/URAhjosWzOrQcE1Nm6mSTBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325804; c=relaxed/simple; bh=fHV0aYWYnoJXj9r6Lxl/Q3FrvJYdEg+Du/Xb7YUjEBw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NMhKykeXwTafkHACGOntw4MFYGr4HuL24ogjVWN67AtTlld2zrxan76oSIsQQYJNLUBDFWwnJ2qOkxcuN7FgvO/vVl4w8LKuqwuKXRqkDg4ojIm0sy5LLk1VjA6kcf3L9B+sRAx92Nv3ECwV1SyTsnhC/B59C0Vm3ob8M3ULDB0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=x3NKRdHD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="x3NKRdHD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0624C32782; Tue, 30 Jul 2024 07:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722325804; bh=fHV0aYWYnoJXj9r6Lxl/Q3FrvJYdEg+Du/Xb7YUjEBw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=x3NKRdHDacyJiHWh8fp+MF2oMH43WtzvVGsqwdUxaV7lZkSxhgyY72pUAO+v4bPBB YT9Y4i90XjIct2RchUuOHWpbC4WmySWCND32B6qcWPMznCxm0wsSDa6miTNfhjfyh2 ZzX+tAE2nEwW1XXblhgR7u5OZi8JEf9p2AHofgkE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42138: mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file Date: Tue, 30 Jul 2024 09:47:56 +0200 Message-ID: <2024073029-CVE-2024-42138-afe8@gregkh> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2442; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fHV0aYWYnoJXj9r6Lxl/Q3FrvJYdEg+Du/Xb7YUjEBw=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkrZk0KPqNx6Ny5lR9FuisY3mVxb1X8FX3XRYC1ao0zc /xb65+8HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRFEaGBZs/JP77LNCxZdWl dfeTlYTUebRTXwFFdRatT7QTsUy82ld3fSvjr+99m8QA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== 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. The Linux kernel CVE team has assigned CVE-2024-42138 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit b217127e5e4e and fixed in 6.1.98 with commit ab557f5cd993 Issue introduced in 5.19 with commit b217127e5e4e and fixed in 6.6.39 with commit f8b55a465b0e Issue introduced in 5.19 with commit b217127e5e4e and fixed in 6.9.9 with commit 9af7437669b7 Issue introduced in 5.19 with commit b217127e5e4e and fixed in 6.10 with commit 8ce34dccbe8f Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2024-42138 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/ethernet/mellanox/mlxsw/core_linecards.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/ab557f5cd993a3201b09593633d04b891263d5c0 https://git.kernel.org/stable/c/f8b55a465b0e8a500179808166fe9420f5c091a1 https://git.kernel.org/stable/c/9af7437669b72f804fc4269f487528dbbed142a2 https://git.kernel.org/stable/c/8ce34dccbe8fa7d2ef86f2d8e7db2a9b67cabfc3