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 6B2B826A09F for ; Fri, 18 Apr 2025 07:02: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=1744959766; cv=none; b=MSayR1E6Lu+eq1nvhu5azpEkTqgVRinrER97r8u1AHAuKnLGRilR8txA1xgGg/Zwu1M4xJiNJ0c+Sgc2jsX7gnRkAFNH2iJylCbVz4L13pJiUHIiGsXvBscTNOwBDZSZ2aJ/NoMRbuy41xlbkO9Ar/KrLr6Q27ISKZB2W8oyrYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744959766; c=relaxed/simple; bh=2+IBHev2PuYlaph1OyLaAHoEuJ22aA5qv+UI6nMuJkE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IB+VlTPqEx1CZYw+B1jgOFYPXHqPIx/YAxIRZEFO5c9sHT2K+41UkLhg3Fgdv2uTFCGvWUbU5F2P5LvooO9Rof2znDF+XYBuYJGTQHSm5wDBTLvJxTn6OzhNk7ZV6mZuduaTwyVf0tZJSmgIPpejd6T5h2ok5HOrvb+wt4fFIeI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jzfGZVun; 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="jzfGZVun" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5852CC4CEE2; Fri, 18 Apr 2025 07:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744959765; bh=2+IBHev2PuYlaph1OyLaAHoEuJ22aA5qv+UI6nMuJkE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jzfGZVunl1A8MGsK7Lwn0uhK9hOHRfp0hcn3ZYkwO0k03Y7tuqueGDOrhrfnr22hS /vJyHAQMQqElHAZ7+ZJ+kbElq4dt5IZicBlf6vYS5LBeFIN8PXoSOeNWyQfbmudhdQ sJeqDBm9/k+GSzkr7ErUa+Kw5g9dX8+JQX1HwKM0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39728: clk: samsung: Fix UBSAN panic in samsung_clk_init() Date: Fri, 18 Apr 2025 09:02:26 +0200 Message-ID: <2025041820-CVE-2025-39728-8713@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=3613; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4Mo2QiDojjQ3ozbnDzJZXpnUyrLrSdhSDmZLgN+bH/E=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmMP/5c5mUWPMIf63TW+1hX1UydurVL5tqXhptwRHOwz PD7LJbeEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPx9GBYsErc/+GGcjXPWgtD 0dC0BrWVRuusGebXSKo19CyaV17q19C8pTzi7An5/dMB 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: clk: samsung: Fix UBSAN panic in samsung_clk_init() With UBSAN_ARRAY_BOUNDS=y, I'm hitting the below panic due to dereferencing `ctx->clk_data.hws` before setting `ctx->clk_data.num = nr_clks`. Move that up to fix the crash. UBSAN: array index out of bounds: 00000000f2005512 [#1] PREEMPT SMP Call trace: samsung_clk_init+0x110/0x124 (P) samsung_clk_init+0x48/0x124 (L) samsung_cmu_register_one+0x3c/0xa0 exynos_arm64_register_cmu+0x54/0x64 __gs101_cmu_top_of_clk_init_declare+0x28/0x60 ... The Linux kernel CVE team has assigned CVE-2025-39728 to this issue. Affected and fixed versions =========================== Issue introduced in 5.5 with commit e620a1e061c4738e26c3edf2abaae7842532cd80 and fixed in 5.10.236 with commit 00307934eb94aaa0a99addfb37b9fe206f945004 Issue introduced in 5.5 with commit e620a1e061c4738e26c3edf2abaae7842532cd80 and fixed in 5.15.180 with commit d974e177369c034984cece9d7d4fada9f8b9c740 Issue introduced in 5.5 with commit e620a1e061c4738e26c3edf2abaae7842532cd80 and fixed in 6.1.134 with commit 0fef48f4a70e45a93e73c39023c3a6ea624714d6 Issue introduced in 5.5 with commit e620a1e061c4738e26c3edf2abaae7842532cd80 and fixed in 6.6.87 with commit 4d29a6dcb51e346595a15b49693eeb728925ca43 Issue introduced in 5.5 with commit e620a1e061c4738e26c3edf2abaae7842532cd80 and fixed in 6.12.23 with commit 24307866e0ac0a5ddb462e766ceda5e27a6fbbe3 Issue introduced in 5.5 with commit e620a1e061c4738e26c3edf2abaae7842532cd80 and fixed in 6.13.11 with commit a1500b98cd81a32fdfb9bc63c33bb9f0c2a0a1bf Issue introduced in 5.5 with commit e620a1e061c4738e26c3edf2abaae7842532cd80 and fixed in 6.14.2 with commit 157de9e48007a20c65d02fc0229a16f38134a72d Issue introduced in 5.5 with commit e620a1e061c4738e26c3edf2abaae7842532cd80 and fixed in 6.15-rc1 with commit d19d7345a7bcdb083b65568a11b11adffe0687af 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-39728 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/clk/samsung/clk.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/00307934eb94aaa0a99addfb37b9fe206f945004 https://git.kernel.org/stable/c/d974e177369c034984cece9d7d4fada9f8b9c740 https://git.kernel.org/stable/c/0fef48f4a70e45a93e73c39023c3a6ea624714d6 https://git.kernel.org/stable/c/4d29a6dcb51e346595a15b49693eeb728925ca43 https://git.kernel.org/stable/c/24307866e0ac0a5ddb462e766ceda5e27a6fbbe3 https://git.kernel.org/stable/c/a1500b98cd81a32fdfb9bc63c33bb9f0c2a0a1bf https://git.kernel.org/stable/c/157de9e48007a20c65d02fc0229a16f38134a72d https://git.kernel.org/stable/c/d19d7345a7bcdb083b65568a11b11adffe0687af