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 1CFD825C811 for ; Fri, 2 May 2025 16:02:09 +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=1746201729; cv=none; b=FotNCRgjnigA7KJPIpGaq/HY0DZLy1wtTcD1g2hqK+kP6Lg+LCqqFVAJHtdROhjvOD/RsgRcN8oCY4jQ/YCY93aLhLiVUR7EUZ2gtAo8MFzyTVwajg/9rwu8z0dRaHetFKPK5w4mudWuBHR1yR8wBJ/+W5ziTdxRJdx0JxiGBrE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746201729; c=relaxed/simple; bh=aYkvttQqEjbyV62BEqwNZEegozfR8mL1htGx+imfFO0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XxCMD7yeYsQgi8rgPVuYLtiZLV8TAbkCmZRKD4ZQCiwyBgiV1DIIcqLBBWKHc2/j+evadvtH2UCdYT0oE/DqGtmxdvNsfNG98rGIN2hl2s2OPIOUSvx8Q+e7yG+Y+V5tebxs0XlOdkAvy1xSYDV3ngrZG8kldyI8cGQjCCc2Q2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bYe2sBmT; 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="bYe2sBmT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99252C4CEE4; Fri, 2 May 2025 16:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746201729; bh=aYkvttQqEjbyV62BEqwNZEegozfR8mL1htGx+imfFO0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=bYe2sBmTAJhCwhYBPEIrrA++tzAiLbvJHFYPD/alEMfo058vFWLv1ivy1IHeXqUrJ ZuoiSZ1IRJ1C7axTNMYc1zj7t4CAnUF9l5fjR97QjL5Uo2N9ikSD8m9TlPScBinyIw dt5/OM6wBVRj6ADILt5s5sKf/8movXK4kNGffjyg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53142: ice: copy last block omitted in ice_get_module_eeprom() Date: Fri, 2 May 2025 17:56:47 +0200 Message-ID: <2025050238-CVE-2023-53142-4d74@gregkh> X-Mailer: git-send-email 2.49.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=5451; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=F+9aFnFZiT5jj3t+9HXgV9IXZhJ7vjJ92gV85m4wwRM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkir351OKbF+O37unTzHgZ5l/Zvh2NqOTKmWzbXTy6dy fHO5YhdRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkYBjDPNPvR9YpNHNUFoZc /6TnLiP6y2xpLsOCxtex56+VMv9/tnAR3+KQC/oe6/wKAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: ice: copy last block omitted in ice_get_module_eeprom() ice_get_module_eeprom() is broken since commit e9c9692c8a81 ("ice: Reimplement module reads used by ethtool") In this refactor, ice_get_module_eeprom() reads the eeprom in blocks of size 8. But the condition that should protect the buffer overflow ignores the last block. The last block always contains zeros. Bug uncovered by ethtool upstream commit 9538f384b535 ("netlink: eeprom: Defer page requests to individual parsers") After this commit, ethtool reads a block with length = 1; to read the SFF-8024 identifier value. unpatched driver: $ ethtool -m enp65s0f0np0 offset 0x90 length 8 Offset Values ------ ------ 0x0090: 00 00 00 00 00 00 00 00 $ ethtool -m enp65s0f0np0 offset 0x90 length 12 Offset Values ------ ------ 0x0090: 00 00 01 a0 4d 65 6c 6c 00 00 00 00 $ $ ethtool -m enp65s0f0np0 Offset Values ------ ------ 0x0000: 11 06 06 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 01 08 00 0x0070: 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 patched driver: $ ethtool -m enp65s0f0np0 offset 0x90 length 8 Offset Values ------ ------ 0x0090: 00 00 01 a0 4d 65 6c 6c $ ethtool -m enp65s0f0np0 offset 0x90 length 12 Offset Values ------ ------ 0x0090: 00 00 01 a0 4d 65 6c 6c 61 6e 6f 78 $ ethtool -m enp65s0f0np0 Identifier : 0x11 (QSFP28) Extended identifier : 0x00 Extended identifier description : 1.5W max. Power consumption Extended identifier description : No CDR in TX, No CDR in RX Extended identifier description : High Power Class (> 3.5 W) not enabled Connector : 0x23 (No separable connector) Transceiver codes : 0x88 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Transceiver type : 40G Ethernet: 40G Base-CR4 Transceiver type : 25G Ethernet: 25G Base-CR CA-N Encoding : 0x05 (64B/66B) BR, Nominal : 25500Mbps Rate identifier : 0x00 Length (SMF,km) : 0km Length (OM3 50um) : 0m Length (OM2 50um) : 0m Length (OM1 62.5um) : 0m Length (Copper or Active cable) : 1m Transmitter technology : 0xa0 (Copper cable unequalized) Attenuation at 2.5GHz : 4db Attenuation at 5.0GHz : 5db Attenuation at 7.0GHz : 7db Attenuation at 12.9GHz : 10db ........ .... The Linux kernel CVE team has assigned CVE-2023-53142 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit e9c9692c8a81aacf0854f68ab54dc182f8be38e8 and fixed in 5.15.103 with commit c813f7a3161481483ae2077651b21bc217c419e0 Issue introduced in 5.13 with commit e9c9692c8a81aacf0854f68ab54dc182f8be38e8 and fixed in 6.1.20 with commit 90b40ab29298db3a4879c1d3c4e685184386bce6 Issue introduced in 5.13 with commit e9c9692c8a81aacf0854f68ab54dc182f8be38e8 and fixed in 6.2.7 with commit 8cfbdda65588e75bfbd93e5ee847efcb4796ad09 Issue introduced in 5.13 with commit e9c9692c8a81aacf0854f68ab54dc182f8be38e8 and fixed in 6.3 with commit 84cba1840e68430325ac133a11be06bfb2f7acd8 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-53142 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/intel/ice/ice_ethtool.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/c813f7a3161481483ae2077651b21bc217c419e0 https://git.kernel.org/stable/c/90b40ab29298db3a4879c1d3c4e685184386bce6 https://git.kernel.org/stable/c/8cfbdda65588e75bfbd93e5ee847efcb4796ad09 https://git.kernel.org/stable/c/84cba1840e68430325ac133a11be06bfb2f7acd8