{"id":"CVE-2025-38216","state":"PUBLISHED","title":"iommu/vt-d: Restore context entry setup order for aliased devices","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niommu/vt-d: Restore context entry setup order for aliased devices\n\nCommit 2031c469f816 (\"iommu/vt-d: Add support for static identity domain\")\nchanged the context entry setup during domain attachment from a\nset-and-check policy to a clear-and-reset approach. This inadvertently\nintroduced a regression affecting PCI aliased devices behind PCIe-to-PCI\nbridges.\n\nSpecifically, keyboard and touchpad stopped working on several Apple\nMacbooks with below messages:\n\n kernel: platform pxa2xx-spi.3: Adding to iommu group 20\n kernel: input: Apple SPI Keyboard as\n /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.3/spi_master/spi2/spi-APP000D:00/input/input0\n kernel: DMAR: DRHD: handling fault status reg 3\n kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr\n 0xffffa000 [fault reason 0x06] PTE Read access is not set\n kernel: DMAR: DRHD: handling fault status reg 3\n kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr\n 0xffffa000 [fault reason 0x06] PTE Read access is not set\n kernel: applespi spi-APP000D:00: Error writing to device: 01 0e 00 00\n kernel: DMAR: DRHD: handling fault status reg 3\n kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr\n 0xffffa000 [fault reason 0x06] PTE Read access is not set\n kernel: DMAR: DRHD: handling fault status reg 3\n kernel: applespi spi-APP000D:00: Error writing to device: 01 0e 00 00\n\nFix this by restoring the previous context setup order.","publishedAt":"2025-07-04T13:37:33.906Z","updatedAt":"2026-10-15T21:52:11.756Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2031c469f8161abe74189cb74f50da224f340b71","status":"affected","lessThan":"fb5873b779dd5858123c19bbd6959566771e2e83","versionType":"git"},{"version":"2031c469f8161abe74189cb74f50da224f340b71","status":"affected","lessThan":"d43c81b691813e16a2d08208ce8947aebdab83cd","versionType":"git"},{"version":"2031c469f8161abe74189cb74f50da224f340b71","status":"affected","lessThan":"320302baed05c6456164652541f23d2a96522c06","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/intel/iommu.c","drivers/iommu/intel/iommu.h","drivers/iommu/intel/nested.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.35","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.4","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/intel/iommu.c","drivers/iommu/intel/iommu.h","drivers/iommu/intel/nested.c"]}],"references":["https://git.kernel.org/stable/c/fb5873b779dd5858123c19bbd6959566771e2e83","https://git.kernel.org/stable/c/d43c81b691813e16a2d08208ce8947aebdab83cd","https://git.kernel.org/stable/c/320302baed05c6456164652541f23d2a96522c06"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38216.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38216","state":"PUBLISHED","datePublished":"2025-07-04T13:37:33.906Z","dateUpdated":"2026-10-15T21:52:11.756Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.995Z"},"containers":{"cna":{"title":"iommu/vt-d: Restore context entry setup order for aliased devices","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niommu/vt-d: Restore context entry setup order for aliased devices\n\nCommit 2031c469f816 (\"iommu/vt-d: Add support for static identity domain\")\nchanged the context entry setup during domain attachment from a\nset-and-check policy to a clear-and-reset approach. This inadvertently\nintroduced a regression affecting PCI aliased devices behind PCIe-to-PCI\nbridges.\n\nSpecifically, keyboard and touchpad stopped working on several Apple\nMacbooks with below messages:\n\n kernel: platform pxa2xx-spi.3: Adding to iommu group 20\n kernel: input: Apple SPI Keyboard as\n /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.3/spi_master/spi2/spi-APP000D:00/input/input0\n kernel: DMAR: DRHD: handling fault status reg 3\n kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr\n 0xffffa000 [fault reason 0x06] PTE Read access is not set\n kernel: DMAR: DRHD: handling fault status reg 3\n kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr\n 0xffffa000 [fault reason 0x06] PTE Read access is not set\n kernel: applespi spi-APP000D:00: Error writing to device: 01 0e 00 00\n kernel: DMAR: DRHD: handling fault status reg 3\n kernel: DMAR: [DMA Read NO_PASID] Request device [00:1e.3] fault addr\n 0xffffa000 [fault reason 0x06] PTE Read access is not set\n kernel: DMAR: DRHD: handling fault status reg 3\n kernel: applespi spi-APP000D:00: Error writing to device: 01 0e 00 00\n\nFix this by restoring the previous context setup order."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2031c469f8161abe74189cb74f50da224f340b71","status":"affected","lessThan":"fb5873b779dd5858123c19bbd6959566771e2e83","versionType":"git"},{"version":"2031c469f8161abe74189cb74f50da224f340b71","status":"affected","lessThan":"d43c81b691813e16a2d08208ce8947aebdab83cd","versionType":"git"},{"version":"2031c469f8161abe74189cb74f50da224f340b71","status":"affected","lessThan":"320302baed05c6456164652541f23d2a96522c06","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/intel/iommu.c","drivers/iommu/intel/iommu.h","drivers/iommu/intel/nested.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.35","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.4","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iommu/intel/iommu.c","drivers/iommu/intel/iommu.h","drivers/iommu/intel/nested.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/fb5873b779dd5858123c19bbd6959566771e2e83"},{"url":"https://git.kernel.org/stable/c/d43c81b691813e16a2d08208ce8947aebdab83cd"},{"url":"https://git.kernel.org/stable/c/320302baed05c6456164652541f23d2a96522c06"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The faulty ordering is reached through local operations that attach or detach IOMMU domains — driver bind/unbind, device hotplug/probe, or VFIO/iommufd device assignment ioctls — not through any network-facing path.\nAC:L - On any platform with DMA-aliased devices (PCIe-to-PCI bridge children, or ACPI-scoped non-PCI devices sharing a parent's source-ID, which land in a separate IOMMU group via generic_device_group()), the clobber is deterministic and repeatable by simply triggering an attach on the sibling device; no race or unpredictable memory layout is involved.\nPR:L - Driving a domain attach requires only low-privileged local access to the device/VFIO interfaces, and in the device-assignment case the beneficiary is an unprivileged guest whose assigned device's context entry gets reprogrammed by an unrelated host attach.\nUI:N - No victim action is needed — the mis-ordered clear-and-reset happens automatically during normal device probe and default-domain attachment.\nS:C - This breaks the IOMMU/DMA isolation boundary itself: a shared context entry ends up programmed with another domain's page tables or with CONTEXT_TT_PASS_THROUGH, so DMA from one security domain reaches memory belonging to a different one (host memory from a guest-assigned device).\nC:H - A device left with the wrong domain's second-level page tables — or with pass-through translation — can DMA-read memory it was never granted, up to all host physical memory in the passthrough case.\nI:H - The same wrong or pass-through context entry grants DMA writes into another domain's or the host's physical memory, which is a direct arbitrary-write primitive usable for control-flow hijack; a stale entry can also point at a torn-down domain's page tables.\nA:H - The demonstrated effect is a DMAR fault storm and permanently dead devices (keyboard and touchpad stop working, \"DRHD: handling fault status reg 3\" flooding), and DMA through freed or wrong page tables can corrupt kernel memory and panic the system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:00:25.669Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.12.35"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.15.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-38216","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:48:38.386362Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:52:11.756Z"}}]}}}