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 E2787215F42 for ; Thu, 8 May 2025 06:40:13 +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=1746686414; cv=none; b=BJCs3k9MZQ1Ee4SMK2k4OR1W5BR3c6BnkJeQNT0Aus6Se4IpW1rEDBV8/IaRoDMAHjrfYwKxQbDIY5QzPl5bP00x0GA2zppwg6HlMOmnJiKs2dByhFrfLAAjiFdVrdU9k5GnBNMNc8oHcVXqR3+Vy9jYP3NiaejZA9xknOJ7MY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746686414; c=relaxed/simple; bh=DJoCnBBGQsXQ8L8LH9mRY1ZIAORm5FgjJY0587VboNk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rPeOG/4xI90GhVFLVk4GpqfaZfiBd83RKsiF9v7n//zJ50tuQdkC0Cyj42ns7dNsKyEx/bCLx/Z99lq3E9UqqvAEgO+NkaCNDX/KV7vjHKTW4bBgTwiqjt4G5LAAd/34ELAByPSbgwqXswyKjT4ta3xV9RlKdD9AlXVmJ0oOLLM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PaTxmpAI; 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="PaTxmpAI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2418C4CEED; Thu, 8 May 2025 06:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746686413; bh=DJoCnBBGQsXQ8L8LH9mRY1ZIAORm5FgjJY0587VboNk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=PaTxmpAI/Yan+vkRHMxIe9gW28R2e2R6aFu80ZVvzC4G8x3BC0jjB5vfRHlrKXOgx luv5xPRu8h7WWAGU4mMvUYxdMC/wIypSMVnGE2FHqmn1fFUXD8es4EgZGg9ALcQUEo 229wa49ZGPehv9UE8Z28fp8iC/B+EzsDbSjuRuzI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37819: irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode() Date: Thu, 8 May 2025 08:39:28 +0200 Message-ID: <2025050820-CVE-2025-37819-a3b9@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=2832; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=6SiKbQ1KeDCRO6+YzQ6HpcC2QNFHEXGFsPn7D5vL1HM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkygTOehsz8MT/2zsRY/9Q3ql9ndDguelTkea7z4UvG5 v2nNe02dsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEEl4zLOhKTbuSKfD+1LpT Bl17tROY5e19pBnmR+6YnzWhRc5Pl33bZsUbb7Q6JzIYAgA= 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/gic-v2m: Prevent use after free of gicv2m_get_fwnode() With ACPI in place, gicv2m_get_fwnode() is registered with the pci subsystem as pci_msi_get_fwnode_cb(), which may get invoked at runtime during a PCI host bridge probe. But, the call back is wrongly marked as __init, causing it to be freed, while being registered with the PCI subsystem and could trigger: Unable to handle kernel paging request at virtual address ffff8000816c0400 gicv2m_get_fwnode+0x0/0x58 (P) pci_set_bus_msi_domain+0x74/0x88 pci_register_host_bridge+0x194/0x548 This is easily reproducible on a Juno board with ACPI boot. Retain the function for later use. The Linux kernel CVE team has assigned CVE-2025-37819 to this issue. Affected and fixed versions =========================== Issue introduced in 4.5 with commit 0644b3daca28dcb320373ae20069c269c9386304 and fixed in 6.6.89 with commit 2f2803e4b5e4df2b08d378deaab78b1681ef9b30 Issue introduced in 4.5 with commit 0644b3daca28dcb320373ae20069c269c9386304 and fixed in 6.12.26 with commit 3939d6f29d34cdb60e3f68b76e39e00a964a1d51 Issue introduced in 4.5 with commit 0644b3daca28dcb320373ae20069c269c9386304 and fixed in 6.14.5 with commit 47bee0081b483b077c7560bc5358ad101f89c8ef Issue introduced in 4.5 with commit 0644b3daca28dcb320373ae20069c269c9386304 and fixed in 6.15-rc4 with commit 3318dc299b072a0511d6dfd8367f3304fb6d9827 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-37819 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-gic-v2m.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/2f2803e4b5e4df2b08d378deaab78b1681ef9b30 https://git.kernel.org/stable/c/3939d6f29d34cdb60e3f68b76e39e00a964a1d51 https://git.kernel.org/stable/c/47bee0081b483b077c7560bc5358ad101f89c8ef https://git.kernel.org/stable/c/3318dc299b072a0511d6dfd8367f3304fb6d9827