{"id":"CVE-2021-47140","published":"2024-03-25T09:07:38Z","modified":"2026-05-11T13:48:49Z","title":"iommu/amd: Clear DMA ops when switching domain","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\niommu/amd: Clear DMA ops when switching domain\n\nSince commit 08a27c1c3ecf (\"iommu: Add support to change default domain\nof an iommu group\") a user can switch a device between IOMMU and direct\nDMA through sysfs. This doesn't work for AMD IOMMU at the moment because\ndev->dma_ops is not cleared when switching from a DMA to an identity\nIOMMU domain. The DMA layer thus attempts to use the dma-iommu ops on an\nidentity domain, causing an oops:\n\n  # echo 0000:00:05.0 > /sys/sys/bus/pci/drivers/e1000e/unbind\n  # echo identity > /sys/bus/pci/devices/0000:00:05.0/iommu_group/type\n  # echo 0000:00:05.0 > /sys/sys/bus/pci/drivers/e1000e/bind\n   ...\n  BUG: kernel NULL pointer dereference, address: 0000000000000028\n   ...\n   Call Trace:\n    iommu_dma_alloc\n    e1000e_setup_tx_resources\n    e1000e_open\n\nSince iommu_change_dev_def_domain() calls probe_finalize() again, clear\nthe dma_ops there like Vt-d does.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00603,"percentile":0.49819,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/f3f2cf46291a693eab21adb94171b0128c2a9ec1","tags":[]},{"url":"https://git.kernel.org/stable/c/d6177a6556f853785867e2ec6d5b7f4906f0d809","tags":[]}],"priority":{"score":13.7,"factors":[{"name":"EPSS percentile","points":9.96},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 08a27c1c3ecf5e1da193ce5f8fc97c3be16e75f0, < f3f2cf46291a693eab21adb94171b0128c2a9ec1",">= 08a27c1c3ecf5e1da193ce5f8fc97c3be16e75f0, < d6177a6556f853785867e2ec6d5b7f4906f0d809"]},{"vendor":"Linux","product":"Linux","versions":["5.11"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-03-28T18:23:40.850053Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2021-33788","exploited":false,"provenance":"source"}}