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 9098C342C93 for ; Mon, 15 Sep 2025 14:52:40 +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=1757947960; cv=none; b=jweoCu7045YURImC7JaSi4bLy6V9h20WZCQb4UYE2xgnim6POFJxuR5k0SdSRYqfRNnJOFyk93oGg36yGtHyu/rhzPovFYr7Ds2aBxDUkL0ecwJ9ldkF9AAqCegOsvC7g+W/CD6xW668EsDP6QFevt5gBZIZi4RxYLRQ8dZMY9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757947960; c=relaxed/simple; bh=/8+kVwVDjNiQbX1STvI7CreNNGS26ZFbAjvbUrLZXYY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Jq5QFdTixT+34R6NulI47F79SfvVwNZydbngS/tXOxrb90cjWXlxYv+iwGOlBmegOYB58uHX0n7YfEIE7JZcctTYT1F7MrGTxqVyqv7uCF9aN3wnmDxG9Ph+G46tYF3r53tzyr3DGebHVdNFMfQUgmdARvhNv3hVGj3XnR0j4TI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PWt6z2E2; 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="PWt6z2E2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5B3EC4CEF1; Mon, 15 Sep 2025 14:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757947960; bh=/8+kVwVDjNiQbX1STvI7CreNNGS26ZFbAjvbUrLZXYY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=PWt6z2E233rjYyY3W5EBRqP/QlieuHRM6N6uj02Ru++YOKl2Pk2ZSSqb5z9/irVpQ j6qquV+mnxAS7px+uC+dFpCV8T+M7HodpXK99BaT3Aj7y9+SuvvC23B+7CPtNLo/Uf TWG5eJjXFsF4oL2As4Pp4VV6O3UXpEAtRI11RLfM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50322: rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe() Date: Mon, 15 Sep 2025 16:48:59 +0200 Message-ID: <2025091553-CVE-2022-50322-079d@gregkh> X-Mailer: git-send-email 2.51.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=2502; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Dl2OLxIVB6oRgn6+lHBOPIE6CGAp5Cj8tudhxr1+tXA=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkn1ENz1m0pUulzkttQtf7ZvsXPJgutPbo4fFf7+zUX9 P+Vyew80hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATec/DsOBmZ8eTmvet6qzm ix4vT9/ktoqbYQ7DguvW0XvUJ+kE2P27rq26vONsmmP6JgA= 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: rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. msc313_rtc_probe() was passing clk_disable_unprepare() directly, which did not have matching prototypes for devm_add_action_or_reset()'s callback argument. Refactor to use devm_clk_get_enabled() instead. This was found as a result of Clang's new -Wcast-function-type-strict flag, which is more sensitive than the simpler -Wcast-function-type, which only checks for type width mismatches. The Linux kernel CVE team has assigned CVE-2022-50322 to this issue. Affected and fixed versions =========================== Fixed in 6.0.17 with commit 5affaaf3334c9274131dae889ed79ea0553d61b4 Fixed in 6.1.3 with commit ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0 Fixed in 6.2 with commit 21b8a1dd56a163825e5749b303858fb902ebf198 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-2022-50322 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/rtc/rtc-msc313.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/5affaaf3334c9274131dae889ed79ea0553d61b4 https://git.kernel.org/stable/c/ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0 https://git.kernel.org/stable/c/21b8a1dd56a163825e5749b303858fb902ebf198