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 1DBA024C07A for ; Tue, 20 May 2025 16:47:59 +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=1747759680; cv=none; b=XCa8fC8J2koe9wy5bbiCCa/pwnBMuCCgW/uc4+ZHTVVpV8/johwzhNG+OKMWzeMEkE0i1ddZIG7G9cjuW1ydx/hYYRmaWDnqdkx4tNxZkfr78eDpLBbvR52aY2GHeOuYUuyPDA1mJZRYuwb8oxVuvMH7lQiPLNhMXryNqKh3Lu8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747759680; c=relaxed/simple; bh=guwbVXGwn/XQH+t8CcYxRTHKnRM09H1oJUg+NWXPQLk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Bm3R2S0WxlaaTZJn99SpHhfPjKczhdEKW+C58nv4ymQF/VJmQM7x2cQYL8XGAYXtiT8twNZoWpch8mJNsgR4xbJY3pEnQEMSKRWj0itseO4yr0Gwu1yRgfVgHhflxfG3AGKY/hfhovKMe5RUuejMSl2mR/kMpaMQF896SckXhDQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Lrw8CaYU; 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="Lrw8CaYU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C536C4CEE9; Tue, 20 May 2025 16:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747759679; bh=guwbVXGwn/XQH+t8CcYxRTHKnRM09H1oJUg+NWXPQLk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Lrw8CaYUqIuL/0TTGR4hAt7ewWhcxPM+CMJIEC5HGgPEOU+d3jh3kPIDffbTArI1K cd45RJ5fa9tUsEMiYDLMR8pZYIqtH94VgZdJtlRkSSVe9jW2ORlWSPk07orjMAjkID ungmefzBKDpW8qsEWYDnqrIgnJUIes5YjK/vPz+s= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37972: Input: mtk-pmic-keys - fix possible null pointer dereference Date: Tue, 20 May 2025 18:45:51 +0200 Message-ID: <2025052046-CVE-2025-37972-31c1@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=2948; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=iVBqJB7kLUIAhk6qOVvgIpcEYSUCkY2sqtGK5qooX1Y=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk6G3cppt3d986h9MThtrurFu+79nIpx5bHkiYOBQ11y 76Z2XTP7ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJzPzFsODsrR9b6xkzZOt7 rpjLXyvS7d2z6gTDgr6LIgvD5x6RefD3Z9rM7Xy75ryPZAEA 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: Input: mtk-pmic-keys - fix possible null pointer dereference In mtk_pmic_keys_probe, the regs parameter is only set if the button is parsed in the device tree. However, on hardware where the button is left floating, that node will most likely be removed not to enable that input. In that case the code will try to dereference a null pointer. Let's use the regs struct instead as it is defined for all supported platforms. Note that it is ok setting the key reg even if that latter is disabled as the interrupt won't be enabled anyway. The Linux kernel CVE team has assigned CVE-2025-37972 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit b581acb49aec5c3b0af9ab1c537fb73481b79069 and fixed in 6.1.139 with commit 334d74a798463ceec02a41eb0e2354aaac0d6249 Issue introduced in 6.0 with commit b581acb49aec5c3b0af9ab1c537fb73481b79069 and fixed in 6.6.91 with commit 90fa6015ff83ef1c373cc61b7c924ab2bcbe1801 Issue introduced in 6.0 with commit b581acb49aec5c3b0af9ab1c537fb73481b79069 and fixed in 6.12.29 with commit 619c05fb176c272ac6cecf723446b39723ee6d97 Issue introduced in 6.0 with commit b581acb49aec5c3b0af9ab1c537fb73481b79069 and fixed in 6.14.7 with commit 09429ddb5a91e9e8f72cd18c012ec4171c2f85ec Issue introduced in 6.0 with commit b581acb49aec5c3b0af9ab1c537fb73481b79069 and fixed in 6.15-rc6 with commit 11cdb506d0fbf5ac05bf55f5afcb3a215c316490 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-37972 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/input/keyboard/mtk-pmic-keys.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/334d74a798463ceec02a41eb0e2354aaac0d6249 https://git.kernel.org/stable/c/90fa6015ff83ef1c373cc61b7c924ab2bcbe1801 https://git.kernel.org/stable/c/619c05fb176c272ac6cecf723446b39723ee6d97 https://git.kernel.org/stable/c/09429ddb5a91e9e8f72cd18c012ec4171c2f85ec https://git.kernel.org/stable/c/11cdb506d0fbf5ac05bf55f5afcb3a215c316490