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 EDD161F418F for ; Wed, 16 Apr 2025 14:16:05 +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=1744812966; cv=none; b=RQUX3n9JEnv2M63PpdGbBMgRkFJiIj5gY72XK+PQREJsc41vx03KP/ltTgyE7z6zqVEbpF3zdK93eHQIWHMW4OChq2Z1dkUPsQkweHtQITFQjpaJKfIojwJabjoUCol9RSej4OOBn/2UFW/0kCJyqVoGWk4Y5pkG955d+d9AK3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744812966; c=relaxed/simple; bh=u64WpDUyOm4o6fYBE8QFeMS07dSGL4WZMD6D2eLp/TU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PiE/SQepyjCuVTv9OgJZxseL+krOImMbQ6+BI8Kl4F4yKLVbaLvYtcRmN0zhFHyCPZzT88TOHB7vH2vhhMIzXel3e2Ncd8SMJ6N+YCUZuY4Evd4ducicRBZi/JdzxDBbkPX7vZNesXsTGah+0LBd9wrTQypCSPdG1AJ5hBueSmc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Tu7mGc8t; 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="Tu7mGc8t" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D99FC4CEE2; Wed, 16 Apr 2025 14:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744812965; bh=u64WpDUyOm4o6fYBE8QFeMS07dSGL4WZMD6D2eLp/TU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Tu7mGc8tnr8ewNUT34nkbWxHKs4GglBEPSlAx6mDUfM22HvgRCra66jyFY6rQ0fYe yAkRF6G7mk+8ld38s0eXIQwLEj/DWDRfz/MATb2fhqsQvuy7qGeiq4P5oDClHt9qYQ t8iqCnFXF4OIyAK/5quQZ8ujrSlRuks5hDN/8ZuI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-22067: spi: cadence: Fix out-of-bounds array access in cdns_mrvl_xspi_setup_clock() Date: Wed, 16 Apr 2025 16:12:38 +0200 Message-ID: <2025041609-CVE-2025-22067-dfb2@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=2720; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=u64WpDUyOm4o6fYBE8QFeMS07dSGL4WZMD6D2eLp/TU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/d+28fk3d29bk/qs7kxR0/hcWBHFMrxaQuHlt9QT5E x25CwVLO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi1SsZ5rtktCzksljHGuih teSxCO/KhGcBRxkWXEnNEn95/P5ypaQp+9Q+dHM4tUl0AAA= 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: spi: cadence: Fix out-of-bounds array access in cdns_mrvl_xspi_setup_clock() If requested_clk > 128, cdns_mrvl_xspi_setup_clock() iterates over the entire cdns_mrvl_xspi_clk_div_list array without breaking out early, causing 'i' to go beyond the array bounds. Fix that by stopping the loop when it gets to the last entry, clamping the clock to the minimum 6.25 MHz. Fixes the following warning with an UBSAN kernel: vmlinux.o: warning: objtool: cdns_mrvl_xspi_setup_clock: unexpected end of section .text.cdns_mrvl_xspi_setup_clock The Linux kernel CVE team has assigned CVE-2025-22067 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 26d34fdc49712ddbd42b11102f5d9d78a0f42097 and fixed in 6.12.23 with commit e50781bf7accc75883cb8a6a9921fb4e2fa8cca4 Issue introduced in 6.12 with commit 26d34fdc49712ddbd42b11102f5d9d78a0f42097 and fixed in 6.13.11 with commit c1fb84e274cb6a2bce6ba5e65116c06e0b3ab275 Issue introduced in 6.12 with commit 26d34fdc49712ddbd42b11102f5d9d78a0f42097 and fixed in 6.14.2 with commit 645f1813fe0dc96381c36b834131e643b798fd73 Issue introduced in 6.12 with commit 26d34fdc49712ddbd42b11102f5d9d78a0f42097 and fixed in 6.15-rc1 with commit 7ba0847fa1c22e7801cebfe5f7b75aee4fae317e 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-2025-22067 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/spi/spi-cadence-xspi.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/e50781bf7accc75883cb8a6a9921fb4e2fa8cca4 https://git.kernel.org/stable/c/c1fb84e274cb6a2bce6ba5e65116c06e0b3ab275 https://git.kernel.org/stable/c/645f1813fe0dc96381c36b834131e643b798fd73 https://git.kernel.org/stable/c/7ba0847fa1c22e7801cebfe5f7b75aee4fae317e