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 44D361465B3 for ; Sat, 17 Aug 2024 09:12:31 +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=1723885951; cv=none; b=htKOs8dL9GH0DrKcbjTfb8Tbu3ZHygSTeRCzrdpl9H7+rMDOM+b2GbRJbK1JAy5XDX5vZ43+hHM9FIpeVeQ7lA6xfbiwY9qZFih9x78ibuYohyF3TS2l9UwG4CmffiOy3DXRlTo8yv4JPF4PVpbLnf2GVpHFZFOIPFZ8/eM/xEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723885951; c=relaxed/simple; bh=EiJLw9CLRbd8ps/2P6CTp0achZT1IAAfb/fD0wyhPPA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Oyzl3o181OzhGM6oNhsjv6ZNfSyl8kpBJ4KmXYu0E4xK868i6VNQzB5QTluCbE43VZRnHUEtaSxNosTrtsqBqnAzJHk4zKqBuGYXUUczDqwQHBLtG1zKchTlbzERCcnCe93ZeI2Q4cj/yIsIEUKRWvguOWphWwYKN6cIF48Y/uo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zhVHz2Vf; 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="zhVHz2Vf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CFD6C116B1; Sat, 17 Aug 2024 09:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723885951; bh=EiJLw9CLRbd8ps/2P6CTp0achZT1IAAfb/fD0wyhPPA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=zhVHz2VfxYF35AbodCEWhsRZWvZ1lA2XO1NLWF7/iO0cUq1tI2Gnhf6mXMQur9Tgi RQeBeEAO2U5H3LXgrqZRLcIMZWD3MKiYEFW20OlZT9JNEE2HtI2lZeh/pdlRKBnUjp cQqZUvAyg5LbubQqP/OfcHIykz+EWxRdK3bR/2A8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42290: irqchip/imx-irqsteer: Handle runtime power management correctly Date: Sat, 17 Aug 2024 11:09:55 +0200 Message-ID: <2024081745-CVE-2024-42290-c966@gregkh> X-Mailer: git-send-email 2.46.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=3246; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=EiJLw9CLRbd8ps/2P6CTp0achZT1IAAfb/fD0wyhPPA=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkHMm5e/pjr3uW77ufvoDLDQkfV6K37ff78ex7nJsf9b sfX3nNfOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiHq8Y5lmnZ++88sm3Rr+F 1WZiWaF1UW1sEcOCHdNOd8+7+/xW/pfNSzP0JRXFPt5KBQA= 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: irqchip/imx-irqsteer: Handle runtime power management correctly The power domain is automatically activated from clk_prepare(). However, on certain platforms like i.MX8QM and i.MX8QXP, the power-on handling invokes sleeping functions, which triggers the 'scheduling while atomic' bug in the context switch path during device probing: BUG: scheduling while atomic: kworker/u13:1/48/0x00000002 Call trace: __schedule_bug+0x54/0x6c __schedule+0x7f0/0xa94 schedule+0x5c/0xc4 schedule_preempt_disabled+0x24/0x40 __mutex_lock.constprop.0+0x2c0/0x540 __mutex_lock_slowpath+0x14/0x20 mutex_lock+0x48/0x54 clk_prepare_lock+0x44/0xa0 clk_prepare+0x20/0x44 imx_irqsteer_resume+0x28/0xe0 pm_generic_runtime_resume+0x2c/0x44 __genpd_runtime_resume+0x30/0x80 genpd_runtime_resume+0xc8/0x2c0 __rpm_callback+0x48/0x1d8 rpm_callback+0x6c/0x78 rpm_resume+0x490/0x6b4 __pm_runtime_resume+0x50/0x94 irq_chip_pm_get+0x2c/0xa0 __irq_do_set_handler+0x178/0x24c irq_set_chained_handler_and_data+0x60/0xa4 mxc_gpio_probe+0x160/0x4b0 Cure this by implementing the irq_bus_lock/sync_unlock() interrupt chip callbacks and handle power management in them as they are invoked from non-atomic context. [ tglx: Rewrote change log, added Fixes tag ] The Linux kernel CVE team has assigned CVE-2024-42290 to this issue. Affected and fixed versions =========================== Issue introduced in 5.0 with commit 0136afa08967 and fixed in 6.1.103 with commit 58c56735facb Issue introduced in 5.0 with commit 0136afa08967 and fixed in 6.6.44 with commit 21bd3f9e7f92 Issue introduced in 5.0 with commit 0136afa08967 and fixed in 6.10.3 with commit f8ae38f1dfe6 Issue introduced in 5.0 with commit 0136afa08967 and fixed in 6.11-rc1 with commit 33b1c47d1fc0 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-42290 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-imx-irqsteer.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/58c56735facb225a5c46fa4b8bbbe7f31d1cb894 https://git.kernel.org/stable/c/21bd3f9e7f924cd2fc892a484e7a50c7e1847565 https://git.kernel.org/stable/c/f8ae38f1dfe652779c7c613facbc257cec00ac44 https://git.kernel.org/stable/c/33b1c47d1fc0b5f06a393bb915db85baacba18ea