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 141BD2505AA for ; Tue, 20 May 2025 15:23:30 +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=1747754610; cv=none; b=pybwZVrLTlSmgM+NRwXtzk/57cpwHtw4/ZlwBRJsQVma1PBNKTgCnCarjHpPZCD2h1xFFYF+iQwht+mWHivls81VEJpzXyYet0M2a54xdy42FEGjxwn1yBLWO7P8fJ2BobAzGNRw5sks1OZx35t4US3m4m5FrJw80HbRtuLxiQ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747754610; c=relaxed/simple; bh=aBbZnJthXoWjVK0yov9IW0mq8o5vXrcEhKOpwYsRwkg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SLWoFppGtVWYRnZfvD5Iacy0hUNVR169DOG9zoEIZN9NDvXkd8MXMpkSZmk9bEZDBCEij9/lP5ZwmzJBq/vNcZJL0ppJKu/d9IPOaxepO7He6ea6I7TlxjMOVW6KgKbh47rzFKLp8WP5W4Q8o5ysj5iWwu3XyQcZXRbEMuTZqXQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=B0maCsa5; 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="B0maCsa5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E479C4CEEA; Tue, 20 May 2025 15:23:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747754609; bh=aBbZnJthXoWjVK0yov9IW0mq8o5vXrcEhKOpwYsRwkg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=B0maCsa5OSf41sIIkBQjHp7w1HPSjqQo1obv+YKwL7fUqlU3UbZCDy2r9Dq+WL2Ss Rmd4nlV/FwE6lXt9yLur4XkQoeMGAOFUWy/fO2AFJrLSj71Qio/g2XPAE7C1qrkl8B syBDsCGYTmz3cxR5rFpxW8pxzafQrt3LUOmn8M+M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37901: irqchip/qcom-mpm: Prevent crash when trying to handle non-wake GPIOs Date: Tue, 20 May 2025 17:21:58 +0200 Message-ID: <2025052055-CVE-2025-37901-1498@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=3776; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4yQEtOCFzL/uhtOGE27MALJ7m8VW2KihHNbt9cMJcCo=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk684S/y3wUrJlRcmS96oEXMetl+SxMTz6Y/mHV9gd13 6pU9y7a1hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATee7JMN+dv2Wj5926iydD HzvcnL1pTYagnRDDPP3N0zpL3i4rFph8vr+JqaNO6eLNhQA= 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: irqchip/qcom-mpm: Prevent crash when trying to handle non-wake GPIOs On Qualcomm chipsets not all GPIOs are wakeup capable. Those GPIOs do not have a corresponding MPM pin and should not be handled inside the MPM driver. The IRQ domain hierarchy is always applied, so it's required to explicitly disconnect the hierarchy for those. The pinctrl-msm driver marks these with GPIO_NO_WAKE_IRQ. qcom-pdc has a check for this, but irq-qcom-mpm is currently missing the check. This is causing crashes when setting up interrupts for non-wake GPIOs: root@rb1:~# gpiomon -c gpiochip1 10 irq: IRQ159: trimming hierarchy from :soc@0:interrupt-controller@f200000-1 Unable to handle kernel paging request at virtual address ffff8000a1dc3820 Hardware name: Qualcomm Technologies, Inc. Robotics RB1 (DT) pc : mpm_set_type+0x80/0xcc lr : mpm_set_type+0x5c/0xcc Call trace: mpm_set_type+0x80/0xcc (P) qcom_mpm_set_type+0x64/0x158 irq_chip_set_type_parent+0x20/0x38 msm_gpio_irq_set_type+0x50/0x530 __irq_set_trigger+0x60/0x184 __setup_irq+0x304/0x6bc request_threaded_irq+0xc8/0x19c edge_detector_setup+0x260/0x364 linereq_create+0x420/0x5a8 gpio_ioctl+0x2d4/0x6c0 Fix this by copying the check for GPIO_NO_WAKE_IRQ from qcom-pdc.c, so that MPM is removed entirely from the hierarchy for non-wake GPIOs. The Linux kernel CVE team has assigned CVE-2025-37901 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit a6199bb514d8a63f61c2a22c1f912376e14d0fb2 and fixed in 6.1.138 with commit 45aced97f01d5ab14c8a2a60f6748f18c501c3f5 Issue introduced in 5.18 with commit a6199bb514d8a63f61c2a22c1f912376e14d0fb2 and fixed in 6.6.90 with commit dfbaecf7e38f5e9bfa5e47a1e525ffbb58bab8cf Issue introduced in 5.18 with commit a6199bb514d8a63f61c2a22c1f912376e14d0fb2 and fixed in 6.12.28 with commit f102342360950b56959e5fff4a874ea88ae13758 Issue introduced in 5.18 with commit a6199bb514d8a63f61c2a22c1f912376e14d0fb2 and fixed in 6.14.6 with commit d5c10448f411a925dd59005785cb971f0626e032 Issue introduced in 5.18 with commit a6199bb514d8a63f61c2a22c1f912376e14d0fb2 and fixed in 6.15-rc5 with commit 38a05c0b87833f5b188ae43b428b1f792df2b384 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-37901 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/irqchip/irq-qcom-mpm.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/45aced97f01d5ab14c8a2a60f6748f18c501c3f5 https://git.kernel.org/stable/c/dfbaecf7e38f5e9bfa5e47a1e525ffbb58bab8cf https://git.kernel.org/stable/c/f102342360950b56959e5fff4a874ea88ae13758 https://git.kernel.org/stable/c/d5c10448f411a925dd59005785cb971f0626e032 https://git.kernel.org/stable/c/38a05c0b87833f5b188ae43b428b1f792df2b384