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 3263556477 for ; Fri, 17 May 2024 13:45:01 +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=1715953501; cv=none; b=P0vsZfUqHEgDRPRme9D9TyGY+SPIMTbrfjDUWS3Bn0uzo9ud3A6c+T6o9TLRK9u+svmnKDf8KUuV0P5cQa48gsTT9d+xxbymCF2dCPD5x1cTWATiBThzhUjxWXq/UN5thW/NyAVdHvhdcIr/rICmGDeGRkO881WKcq+/PQUcK+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715953501; c=relaxed/simple; bh=lRrZS8HvCD873Pelq+PS7ONjqf5iqy3zG5Ljc7PxSTo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MK0GUUb9lSIKui4LlQwrKWXaHyf3+aqeJZcNOXTxQ+VSSL4//EN9qoAebROu1jhn49hlK1yWSQv8JwTHTI/xeyOrsWMpsjoACj5R2rroUohvHgtFn9l8zK8S6Ws/a2nxvHMh0VUuOYbseIw1+HGzKFk78gsdsp5eqkSfj8kUHlQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xCsGZPGc; 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="xCsGZPGc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8321C2BD10; Fri, 17 May 2024 13:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715953501; bh=lRrZS8HvCD873Pelq+PS7ONjqf5iqy3zG5Ljc7PxSTo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=xCsGZPGchZCYKrF6EMg1/FTEF6em0L5kta5/KFJeUXPh1zVoMMeVN9Gkp9AZtG25H vuDKGURflQuwm+MTH4SkEQgEFP1TK/YFkIUQA1IrjPe19d8ovNIsrWn33FmReeUrHk u+XCho39Ig+ZEOsadlLI/0zinGhRi8JwI5qY/+h8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52664: net: atlantic: eliminate double free in error handling logic Date: Fri, 17 May 2024 15:44:57 +0200 Message-ID: <2024051756-CVE-2023-52664-dea1@gregkh> X-Mailer: git-send-email 2.45.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=2440; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lRrZS8HvCD873Pelq+PS7ONjqf5iqy3zG5Ljc7PxSTo=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnu8RElN9rbPA7o8urvKbfSXVrXe7ptlX1/2P7qtkfXf /Pt2BjSEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOx4GGYX/nhvENgdFft/tOm G+Y7td+9lVZymGHBpJQznK2e31O5rzz+UzL7z7ZjwtyWAA== 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: atlantic: eliminate double free in error handling logic Driver has a logic leak in ring data allocation/free, where aq_ring_free could be called multiple times on same ring, if system is under stress and got memory allocation error. Ring pointer was used as an indicator of failure, but this is not correct since only ring data is allocated/deallocated. Ring itself is an array member. Changing ring allocation functions to return error code directly. This simplifies error handling and eliminates aq_ring_free on higher layer. The Linux kernel CVE team has assigned CVE-2023-52664 to this issue. Affected and fixed versions =========================== Fixed in 6.1.77 with commit 0edb3ae8bfa3 Fixed in 6.6.16 with commit c11a870a73a3 Fixed in 6.7.4 with commit d1fde4a7e1dc Fixed in 6.8 with commit b3cb7a830a24 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-2023-52664 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/aquantia/atlantic/aq_ptp.c drivers/net/ethernet/aquantia/atlantic/aq_ring.c drivers/net/ethernet/aquantia/atlantic/aq_ring.h drivers/net/ethernet/aquantia/atlantic/aq_vec.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/0edb3ae8bfa31cd544b0c195bdec00e036002b5d https://git.kernel.org/stable/c/c11a870a73a3bc4cc7df6dd877a45b181795fcbf https://git.kernel.org/stable/c/d1fde4a7e1dcc4d49cce285107a7a43c3030878d https://git.kernel.org/stable/c/b3cb7a830a24527877b0bc900b9bd74a96aea928