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 EE3EA4122C for ; Sat, 2 Mar 2024 21:54:45 +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=1709416486; cv=none; b=oqkQIoI/dqkgsK6FrRoTd9VipAY99yzSGGxWwS65amgCXBbjPCzaL2RPdgG8Csgn89la0pqM7oPmRQR4ylSDBM1LUoI2ucsePkDBcYAp/xHM/vvOSmvWsRv5AUYVRN1uc9Ab6l0ycLzFO6PTvn/HxieqtpmYjEwCoAkjXbHIX1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709416486; c=relaxed/simple; bh=/9Gh6ZdFt/EabN9s3XbpjV8jkxq2mLTKjDkJcSIvfEw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MkehNwQcBHNq51uIAGoPxpIRXm1iRcI7zmIQww6CbU4hoGO3gwHw5iZ4nUn0BdoXdINoFBdjep0PtJu1GhZ2066ZgM6oqo6mp1VRt+3bk/Jx19R3nhNKoiIhyeLu+CU68RdqhFZ8aI7KHcFP18Uo75aIoH+yHe1w1RZ9jRPaeXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hZm07aTp; 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="hZm07aTp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72C42C433F1; Sat, 2 Mar 2024 21:54:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709416485; bh=/9Gh6ZdFt/EabN9s3XbpjV8jkxq2mLTKjDkJcSIvfEw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hZm07aTp3EmLVqzvF0KbB+23Y7ReTJeyUSwWdKG5zQVf8EU2PPVpndH0yKr0eU3YJ mqxIWayPMB3Haozynut3Z1NXothfUZSQfGhIeeKvgOXLNRpvoLd2HzXOevP0ZNGTTo cZJSGwUZqrnQtN3r9f6KQYvEkN9sYZI/bDw99U2U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52505: phy: lynx-28g: serialize concurrent phy_set_mode_ext() calls to shared registers Date: Sat, 2 Mar 2024 22:52:50 +0100 Message-ID: <2024030249-CVE-2023-52505-8ac5@gregkh> X-Mailer: git-send-email 2.44.0 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=2519; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/9Gh6ZdFt/EabN9s3XbpjV8jkxq2mLTKjDkJcSIvfEw=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmP528U/cV4z9Tzn/+rmo/3JfK8DpnynlV5aKVVFOTN9 H6HVL5oRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkqQ7DPLvrbQx7z+tZF8ge +VU62am9yazSlGF+9s+llZlHDc99P7WP8fnXMw4hRr9zAA== 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: phy: lynx-28g: serialize concurrent phy_set_mode_ext() calls to shared registers The protocol converter configuration registers PCC8, PCCC, PCCD (implemented by the driver), as well as others, control protocol converters from multiple lanes (each represented as a different struct phy). So, if there are simultaneous calls to phy_set_mode_ext() to lanes sharing the same PCC register (either for the "old" or for the "new" protocol), corruption of the values programmed to hardware is possible, because lynx_28g_rmw() has no locking. Add a spinlock in the struct lynx_28g_priv shared by all lanes, and take the global spinlock from the phy_ops :: set_mode() implementation. There are no other callers which modify PCC registers. The Linux kernel CVE team has assigned CVE-2023-52505 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit 8f73b37cf3fb and fixed in 6.1.59 with commit 6f901f8448c6 Issue introduced in 5.18 with commit 8f73b37cf3fb and fixed in 6.5.8 with commit c2d7c79898b4 Issue introduced in 5.18 with commit 8f73b37cf3fb and fixed in 6.6 with commit 139ad1143151 Please see https://www.kernel.org or 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-52505 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/phy/freescale/phy-fsl-lynx-28g.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/6f901f8448c6b25ed843796b114471d2a3fc5dfb https://git.kernel.org/stable/c/c2d7c79898b427d263c64a4841987eec131f2d4e https://git.kernel.org/stable/c/139ad1143151a07be93bf741d4ea7c89e59f89ce