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 20D111F667C for ; Fri, 27 Dec 2024 15:08:14 +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=1735312095; cv=none; b=gteUZMT5rHdvRn0I9GMVDK0E0OKjGB/7mJ9yKR5CraVLkyoe3fX8TyoIW2fjXYW63jix9i0R0u0aKKBjrk4T2dwHQbrKBL+gY1mqtXJRYONFE9DzUhszhBlSz1+lyRgnOWEdIUC7jXRT67T3oJI45E/a0+a5gg2ZObsxjGWOg70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735312095; c=relaxed/simple; bh=PJMYCWpUBPJrN2zp0mgmyhYfu5evOkAWjXF7rn/r0Dk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mEvovf061wo9UunG76xd9BfM0nglDn6+p8nZq2HAX5IdlWjXoAI4R8Xug22qfdbNpfxBI7F9ZQOxVI0KF9gFcbDg/LQpNqmPhan4KY3MToY2pgZZxMAabQpZGx8m/khKMKz1RoSJw0S+7SR2K2YdrR2u3pAmsMDSNO8kpGQwfN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qbM4vpYp; 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="qbM4vpYp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FDD0C4CED3; Fri, 27 Dec 2024 15:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735312094; bh=PJMYCWpUBPJrN2zp0mgmyhYfu5evOkAWjXF7rn/r0Dk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=qbM4vpYpTZU1m/zqKFV4PSGdZuigmu2HtV9ysjK/1V1nTyW7rn3b8v6yLL4+kHqjo /cHnag8x/gCefzLBbpwxiCUuZPpb6CPtZWwgBwfpUEDraWuiVOild1PoQlL+Bh8OXv 48Xosf4DPz97dF+q4NdHH5OWZLto7o1+x39tM/ZE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56660: net/mlx5: DR, prevent potential error pointer dereference Date: Fri, 27 Dec 2024 16:06:57 +0100 Message-ID: <2024122751-CVE-2024-56660-fb9d@gregkh> X-Mailer: git-send-email 2.47.1 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=2613; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PJMYCWpUBPJrN2zp0mgmyhYfu5evOkAWjXF7rn/r0Dk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5h7rZ00q87nxu+bVn91Z9+RWLrt11DjKT6v+alXuu7 uCHxl91HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARkSaGBcvyNolxMvHrazPl 9ZW9mK/PJNX9m2F+0TfWW2nGWSc3uzJJnOJ0fhNtXJYHAA== 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: net/mlx5: DR, prevent potential error pointer dereference The dr_domain_add_vport_cap() function generally returns NULL on error but sometimes we want it to return ERR_PTR(-EBUSY) so the caller can retry. The problem here is that "ret" can be either -EBUSY or -ENOMEM and if it's and -ENOMEM then the error pointer is propogated back and eventually dereferenced in dr_ste_v0_build_src_gvmi_qpn_tag(). The Linux kernel CVE team has assigned CVE-2024-56660 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit 11a45def2e197532c46aa908dedd52bc1ee378a2 and fixed in 6.1.121 with commit 61f720e801443d4e2a3c0261eda4ad8431458dca Issue introduced in 5.16 with commit 11a45def2e197532c46aa908dedd52bc1ee378a2 and fixed in 6.6.67 with commit 325cf73a1b449fea3158ab99d03a7a717aad1618 Issue introduced in 5.16 with commit 11a45def2e197532c46aa908dedd52bc1ee378a2 and fixed in 6.12.6 with commit a59c61a1869ceefc65ef02886f91e8cd0062211f Issue introduced in 5.16 with commit 11a45def2e197532c46aa908dedd52bc1ee378a2 and fixed in 6.13-rc3 with commit 11776cff0b563c8b8a4fa76cab620bfb633a8cb8 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-56660 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/mlx5/core/steering/sws/dr_domain.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/61f720e801443d4e2a3c0261eda4ad8431458dca https://git.kernel.org/stable/c/325cf73a1b449fea3158ab99d03a7a717aad1618 https://git.kernel.org/stable/c/a59c61a1869ceefc65ef02886f91e8cd0062211f https://git.kernel.org/stable/c/11776cff0b563c8b8a4fa76cab620bfb633a8cb8