{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-38216",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:23.995Z",
        "datePublished": "2025-07-04T13:37:33.906Z",
        "dateUpdated": "2026-08-05T12:00:25.669Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T12:00:25.669Z"
            },
            "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."
                }
            ],
            "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."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "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"
                    ],
                    "versions": [
                        {
                            "version": "2031c469f8161abe74189cb74f50da224f340b71",
                            "lessThan": "fb5873b779dd5858123c19bbd6959566771e2e83",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2031c469f8161abe74189cb74f50da224f340b71",
                            "lessThan": "d43c81b691813e16a2d08208ce8947aebdab83cd",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2031c469f8161abe74189cb74f50da224f340b71",
                            "lessThan": "320302baed05c6456164652541f23d2a96522c06",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "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"
                    ],
                    "versions": [
                        {
                            "version": "6.12",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.12",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.35",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15.4",
                            "lessThanOrEqual": "6.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "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"
                                }
                            ]
                        }
                    ]
                }
            ],
            "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"
                }
            ],
            "title": "iommu/vt-d: Restore context entry setup order for aliased devices",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}