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 B0DD512CDBF for ; Wed, 1 May 2024 13:07:08 +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=1714568828; cv=none; b=sXA4vCNczf2oLi0Lgh3t/odUmPuESEBYP1JbPeowUATmfytqbaJCK2rexhT5f1ozX4BpbPRQsWSjkaQA0iiNPzCf96RSIZgIjhXWLV5/PNTblkjZQBhoD/vmp89EVcep8vDNVAQC1JNM0nYRq2NyprGmcVanPJiTA5TXLD+1wac= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568828; c=relaxed/simple; bh=rzy+1h9HWSlr0WbzAP1tveG4PqtFS6h0o6aH7KeUUh0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uk/YMmGJjRnDSzjRu5skdMwqITztOz/g4lpKiFKuOsL5ELj2GM6nIlVEEwEDz9mFsetvdQe4F1IqBhAzLwNmaJa1YnU3wxHBaDTlEkVwcu3VI/rAj4L6NlrSHPp4mLbP0yurC9WR9AFlBWJyDLopNTkFOhB0NR30RvYPnF4i0q0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0cYyh3GP; 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="0cYyh3GP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E97E9C4AF18; Wed, 1 May 2024 13:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714568828; bh=rzy+1h9HWSlr0WbzAP1tveG4PqtFS6h0o6aH7KeUUh0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0cYyh3GPi3wfpVRk9jHxKe21dEqNf6NAehLfuKoo0K3HrW/kg5WpzTBXlcLQTZmgT 8BmUfbUPCH3piCOulZkK3KJOKmqwxmT3BGLsMIrrPNbc6z2j3cqGmsr5FLrp0dukY/ NOfbw7f8KPSMP5h14aiOjfa/U73A1nKNByNvXP5E= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27079: iommu/vt-d: Fix NULL domain on device release Date: Wed, 1 May 2024 15:06:50 +0200 Message-ID: <2024050134-CVE-2024-27079-f478@gregkh> X-Mailer: git-send-email 2.44.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=2639; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=rzy+1h9HWSlr0WbzAP1tveG4PqtFS6h0o6aH7KeUUh0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlGdtF9gj7fss9K3trTqL+TeeFu6Y597H2MR6/Vfdl15 238qWyZjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZgIsxTDgjV/LRoCWBjczXfl L352uMpD5PZ2LYa5UhyH5t+snKp/5P9+g9Vs3RO9Z7xZCwA= 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: iommu/vt-d: Fix NULL domain on device release In the kdump kernel, the IOMMU operates in deferred_attach mode. In this mode, info->domain may not yet be assigned by the time the release_device function is called. It leads to the following crash in the crash kernel: BUG: kernel NULL pointer dereference, address: 000000000000003c ... RIP: 0010:do_raw_spin_lock+0xa/0xa0 ... _raw_spin_lock_irqsave+0x1b/0x30 intel_iommu_release_device+0x96/0x170 iommu_deinit_device+0x39/0xf0 __iommu_group_remove_device+0xa0/0xd0 iommu_bus_notifier+0x55/0xb0 notifier_call_chain+0x5a/0xd0 blocking_notifier_call_chain+0x41/0x60 bus_notify+0x34/0x50 device_del+0x269/0x3d0 pci_remove_bus_device+0x77/0x100 p2sb_bar+0xae/0x1d0 ... i801_probe+0x423/0x740 Use the release_domain mechanism to fix it. The scalable mode context entry which is not part of release domain should be cleared in release_device(). The Linux kernel CVE team has assigned CVE-2024-27079 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit 586081d3f6b1 and fixed in 6.8.2 with commit 333fe8696848 Issue introduced in 5.18 with commit 586081d3f6b1 and fixed in 6.9-rc1 with commit 81e921fd3216 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-27079 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/iommu/intel/iommu.c drivers/iommu/intel/pasid.c drivers/iommu/intel/pasid.h 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/333fe86968482ca701c609af590003bcea450e8f https://git.kernel.org/stable/c/81e921fd321614c2ad8ac333b041aae1da7a1c6d