Skip to contentSkip to conversation

CVE-2021-47035: iommu/vt-d: Remove WO permissions on second-level paging entries

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 28, 2024

lore
Share & tools
lore
#0 lore raw

From: [email protected]

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

iommu/vt-d: Remove WO permissions on second-level paging entries

When the first level page table is used for IOVA translation, it only supports Read-Only and Read-Write permissions. The Write-Only permission is not supported as the PRESENT bit (implying Read permission) should always set. When using second level, we still give separate permissions that allows WriteOnly which seems inconsistent and awkward. We want to have consistent behavior. After moving to 1st level, we don't want things to work sometimes, and break if we use 2nd level for the same mappings. Hence remove this configuration.

The Linux kernel CVE team has assigned CVE-2021-47035 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.6 with commit b802d070a52a1 and fixed in 5.10.37 with commit c848416cc05a
	Issue introduced in 5.6 with commit b802d070a52a1 and fixed in 5.10.38 with commit 89bd62079870
	Issue introduced in 5.6 with commit b802d070a52a1 and fixed in 5.11.21 with commit 25faff781389
	Issue introduced in 5.6 with commit b802d070a52a1 and fixed in 5.12.4 with commit 66c24699f266
	Issue introduced in 5.6 with commit b802d070a52a1 and fixed in 5.13 with commit eea53c581688

Please see https://www.kernel.org or 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-2021-47035

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

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/c848416cc05afc1589edba04fe00b85c2f797ee3
	https://git.kernel.org/stable/c/89bd620798704a8805fc9db0d71d7f812cf5b3d2
	https://git.kernel.org/stable/c/25faff78138933244c678c7fc78f7c0340fa04a0
	https://git.kernel.org/stable/c/66c24699f266ff310381a9552d3576eea8ad6e20
	https://git.kernel.org/stable/c/eea53c5816889ee8b64544fa2e9311a81184ff9c