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 1275F19E7D1 for ; Thu, 10 Jul 2025 07:37: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=1752133062; cv=none; b=lFmIS/8ljPCWOjCPN7GbpCTUN2ZAMq6NeKFvJ+s0rCSdOAEb/DTXubf4czFM1WbijUgcXoIgBVjDAMZlRVIYwxAY4ZEN/+otSb0rumG9O7Y3oZ9fw2NvyFxY9aOqc304Zs5YFrC05X85MKp/OP0PrxceFDgpCPwxo8sE38EepxY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752133062; c=relaxed/simple; bh=ct62jpRlehlJB49SB+xlzkagjMYlwvSHSWaOryf7hEY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hqIOaqeC3iVIVTOc2cdElZyYqR+XOomhDuNz1P4ZBziBpIG5Ul+naWR24PTq8093VhF5a0oTS51Jll6/Y54F9koSpmrKRN9oj6z+kpQdEdAfbFwa65bk23m4Swyt4WqM6HqJBTJQmrqBnfpfuz27eiiI8FZuu8fcGY8GLaEsYDs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Gy9nFcfE; 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="Gy9nFcfE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 367D5C4CEE3; Thu, 10 Jul 2025 07:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752133061; bh=ct62jpRlehlJB49SB+xlzkagjMYlwvSHSWaOryf7hEY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Gy9nFcfEMgEDMsrFE0qbBt20mO0JMbJiEP9xTQKATYyHE7moXu7hesXvDh791w7jY Fj1cti18nAreSEmi+PxWfrm3ceHe9NtDBgrxiHDhTKB6auch7O2mzISav31OED64UO zD6gBx1g/1Io+0RtfzSqgoeO9OTaEUA2EHwU02ac= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38266: pinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms Date: Thu, 10 Jul 2025 09:37:37 +0200 Message-ID: <2025071037-CVE-2025-38266-c33c@gregkh> X-Mailer: git-send-email 2.50.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=2914; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1IFSm7pj9Oge1r2iCTG3CfiyYgqXs2Rk6164YRXPfBw=; b=owGbwMvMwCRo6H6F97bub03G02pJDBn5uQfPZhctNU7garvQ8WGaYNGN1TpHjFfNlGAxMBUyX 5RvVRnbEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOZ5M2wYF7CF8kFNfcadfMe zXL+lmtXuqFoHsNcgU/rk45lffVzLj9xOfBSjviHbX9qAA== 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: pinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms Commit 3ef9f710efcb ("pinctrl: mediatek: Add EINT support for multiple addresses") introduced an access to the 'soc' field of struct mtk_pinctrl in mtk_eint_do_init() and for that an include of pinctrl-mtk-common-v2.h. However, pinctrl drivers relying on the v1 common driver include pinctrl-mtk-common.h instead, which provides another definition of struct mtk_pinctrl that does not contain an 'soc' field. Since mtk_eint_do_init() can be called both by v1 and v2 drivers, it will now try to dereference an invalid pointer when called on v1 platforms. This has been observed on Genio 350 EVK (MT8365), which crashes very early in boot (the kernel trace can only be seen with earlycon). In order to fix this, since 'struct mtk_pinctrl' was only needed to get a 'struct mtk_eint_pin', make 'struct mtk_eint_pin' a parameter of mtk_eint_do_init() so that callers need to supply it, removing mtk_eint_do_init()'s dependency on any particular 'struct mtk_pinctrl'. The Linux kernel CVE team has assigned CVE-2025-38266 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 3ef9f710efcb5cc1335b5b09c16c757f703d7e5f and fixed in 6.15.2 with commit 9ebe21ede792cef851847648962c363cac67d17f Issue introduced in 6.15 with commit 3ef9f710efcb5cc1335b5b09c16c757f703d7e5f and fixed in 6.16-rc1 with commit 1c9977b263475373b31bbf86af94a5c9ae2be42c 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-38266 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/pinctrl/mediatek/mtk-eint.c drivers/pinctrl/mediatek/mtk-eint.h drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c drivers/pinctrl/mediatek/pinctrl-mtk-common.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/9ebe21ede792cef851847648962c363cac67d17f https://git.kernel.org/stable/c/1c9977b263475373b31bbf86af94a5c9ae2be42c