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 1D6EB1F4283 for ; Fri, 27 Dec 2024 13:55:41 +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=1735307741; cv=none; b=LV7FKrg5csl6FWNgb4D9lda04Swo5tgdx5MH4hhiJRp4uLLXCWJTsX5rwcCfuWg+tJB/gcEOp5WoxqLjeJeVq81qpqhQoEwJzcgHzboaa9uRq4lsZPEcs2L06lHl3tZ5rx8KylIP2+mv2abHSk7DNfEZQcetnhgNVpwafsiVkyk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735307741; c=relaxed/simple; bh=A4SFyZdoYF8Yx31gKTWdxqD9MiRiP+b6hosKz1Wlwww=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kIEtRht+TYcfn7gcjMSyIzvTJZQV/R5PFlQrhSdEgoDNC8dEEi4XqYWzt5rnz6gJw/zk8z8w04nBRGUODQDwzPpYpvDsmU8jPerEJbsXC6XbQo0/yLZneLAiyxaXRPV5vd/EtNKWDRWG42j8tr6iIT6rKV5CQG0AyBTjvO1vt2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zlNVfHnz; 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="zlNVfHnz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B460C4CED0; Fri, 27 Dec 2024 13:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735307741; bh=A4SFyZdoYF8Yx31gKTWdxqD9MiRiP+b6hosKz1Wlwww=; h=From:To:Cc:Subject:Date:Reply-to:From; b=zlNVfHnzbdoct7ChfdUuFXQ4OZ3/EcZgd05tBmqBvLgTpi6KZemEO8tf7rfIT/ssP s4xhvrZbKXNKFw2pyc8mLEe93fuGGRZFxB81qvwSCcuSRPnrlC1E8oKa9WYwInJxdg mWW+fsPLtAoUvHdNx2Hx0fgDaZIY7XqfkQGzT2tY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53223: clk: ralink: mtmips: fix clocks probe order in oldest ralink SoCs Date: Fri, 27 Dec 2024 14:53:09 +0100 Message-ID: <2024122734-CVE-2024-53223-7669@gregkh> X-Mailer: git-send-email 2.47.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=4200; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=A4SFyZdoYF8Yx31gKTWdxqD9MiRiP+b6hosKz1Wlwww=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5G5VSvB5enGf4obQ1/dAiAwGzB91F6gJqcsV3psaVP C9NmnauI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbSJ8swV+RdI3v/hk3nujbu NvCU+CxcFq44iWHBQb6JeXmLvGbl3uTjLIiZ9O8dZ8dqAA== 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: clk: ralink: mtmips: fix clocks probe order in oldest ralink SoCs Base clocks are the first in being probed and are real dependencies of the rest of fixed, factor and peripheral clocks. For old ralink SoCs RT2880, RT305x and RT3883 'xtal' must be defined first since in any other case, when fixed clocks are probed they are delayed until 'xtal' is probed so the following warning appears: WARNING: CPU: 0 PID: 0 at drivers/clk/ralink/clk-mtmips.c:499 rt3883_bus_recalc_rate+0x98/0x138 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.43 #0 Stack : 805e58d0 00000000 00000004 8004f950 00000000 00000004 00000000 00000000 80669c54 80830000 80700000 805ae570 80670068 00000001 80669bf8 00000000 00000000 00000000 805ae570 80669b38 00000020 804db7dc 00000000 00000000 203a6d6d 80669b78 80669e48 70617773 00000000 805ae570 00000000 00000009 00000000 00000001 00000004 00000001 00000000 00000000 83fe43b0 00000000 ... Call Trace: [<800065d0>] show_stack+0x64/0xf4 [<804bca14>] dump_stack_lvl+0x38/0x60 [<800218ac>] __warn+0x94/0xe4 [<8002195c>] warn_slowpath_fmt+0x60/0x94 [<80259ff8>] rt3883_bus_recalc_rate+0x98/0x138 [<80254530>] __clk_register+0x568/0x688 [<80254838>] of_clk_hw_register+0x18/0x2c [<8070b910>] rt2880_clk_of_clk_init_driver+0x18c/0x594 [<8070b628>] of_clk_init+0x1c0/0x23c [<806fc448>] plat_time_init+0x58/0x18c [<806fdaf0>] time_init+0x10/0x6c [<806f9bc4>] start_kernel+0x458/0x67c ---[ end trace 0000000000000000 ]--- When this driver was mainlined we could not find any active users of old ralink SoCs so we cannot perform any real tests for them. Now, one user of a Belkin f9k1109 version 1 device which uses RT3883 SoC appeared and reported some issues in openWRT: - https://github.com/openwrt/openwrt/issues/16054 Thus, define a 'rt2880_xtal_recalc_rate()' just returning the expected frequency 40Mhz and use it along the old ralink SoCs to have a correct boot trace with no warnings and a working clock plan from the beggining. The Linux kernel CVE team has assigned CVE-2024-53223 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit 6f3b15586eef736831abe6a14f2a6906bc0dc074 and fixed in 6.6.64 with commit fbb13732c6ffa9d58cedafabcd5ce8fd7ef8ae5a Issue introduced in 6.5 with commit 6f3b15586eef736831abe6a14f2a6906bc0dc074 and fixed in 6.11.11 with commit fe09d609f2304c7775789090e3f006d786852148 Issue introduced in 6.5 with commit 6f3b15586eef736831abe6a14f2a6906bc0dc074 and fixed in 6.12.2 with commit e29306c0e1ae4b434db32c90705844c77f701be5 Issue introduced in 6.5 with commit 6f3b15586eef736831abe6a14f2a6906bc0dc074 and fixed in 6.13-rc1 with commit d34db686a3d74bd564bfce2ada15011c556269fc 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-2024-53223 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/ralink/clk-mtmips.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/fbb13732c6ffa9d58cedafabcd5ce8fd7ef8ae5a https://git.kernel.org/stable/c/fe09d609f2304c7775789090e3f006d786852148 https://git.kernel.org/stable/c/e29306c0e1ae4b434db32c90705844c77f701be5 https://git.kernel.org/stable/c/d34db686a3d74bd564bfce2ada15011c556269fc