{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-54043",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-12-24T10:53:46.181Z",
        "datePublished": "2025-12-24T12:22:55.392Z",
        "dateUpdated": "2026-08-05T09:16:43.725Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:16:43.725Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\niommufd: Do not add the same hwpt to the ioas->hwpt_list twice\n\nThe hwpt is added to the hwpt_list only during its creation, it is never\nadded again. This hunk is some missed leftover from rework. Adding it\ntwice will corrupt the linked list in some cases.\n\nIt effects HWPT specific attachment, which is something the test suite\ncannot cover until we can create a legitimate struct device with a\nnon-system iommu \"driver\" (ie we need the bus removed from the iommu code)"
                }
            ],
            "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 vulnerable path is entered only through ioctls on the local `/dev/iommu` character device and a VFIO device fd (`vfio_iommufd_physical_attach_ioas()` → `iommufd_device_attach()`). There is no network or adjacent-network exposure.\nAC:L - There is no race window and no dependence on memory layout the attacker cannot shape — the duplicate `list_add_tail()` on an already-linked `hwpt_item` executes deterministically on every hw_pagetable-targeted attach, and the follow-on UAF is reached by an ordinary attacker-chosen attach/detach/attach ioctl sequence with standard heap grooming.\nPR:L - An unprivileged local account that has been granted device-passthrough access — the normal configuration for a QEMU/libvirt VM user on a virtualization host, where `/dev/iommu` (mode 0660) and the VFIO device nodes are group-accessible — can perform every required ioctl; no CAP_SYS_ADMIN or root in the init namespace is needed.\nUI:N - The entire sequence (bind device, attach to IOAS, attach to the returned hw_pagetable, detach, re-enumerate) is issued by the attacker's own process. No victim action or interaction is required.\nS:C - iommufd is the control plane for IOMMU/DMA isolation, and the corruption lets a device end up attached to a freed or attacker-shaped `iommu_domain` via `iommufd_device_do_attach()` → `iommu_attach_group(hwpt->domain, ...)`, defeating the DMA translation boundary that protects host memory from the passthrough device and the guest that owns it.\nC:H - After `list_del()` leaves `ioas->hwpt_list.next` dangling at the freed hwpt, every later list walk reads a use-after-free `struct iommufd_hw_pagetable`; since that object is a sprayable `kzalloc(GFP_KERNEL_ACCOUNT)` allocation, the attacker gains a read primitive over reclaimed kernel memory, and a bogus `hwpt->domain` additionally exposes host memory to device DMA.\nI:H - The corrupted list yields both a write primitive (a later `list_add_tail` stores kernel pointers into the reclaimed allocation) and an indirect call through `hwpt->domain->ops->enforce_cache_coherency()` on freed, attacker-controlled memory, which is a control-flow hijack and full kernel-integrity compromise.\nA:H - The self-referential node makes `list_for_each_entry()` in `iommufd_device_auto_get_domain()` and `iommufd_vfio_cc_iommu()` never terminate while holding `ioas->mutex`, producing an unkillable soft lockup and a permanently wedged mutex, and the use-after-free independently causes oopses and panics."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/iommu/iommufd/device.c"
                    ],
                    "versions": [
                        {
                            "version": "e8d57210035b6377d424ba964961892d01127cf6",
                            "lessThan": "c44adefdcf472f946f0632f4e0ddcbf3e00b8516",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e8d57210035b6377d424ba964961892d01127cf6",
                            "lessThan": "b4ff830eca097df51af10a9be29e8cc817327919",
                            "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/iommufd/device.c"
                    ],
                    "versions": [
                        {
                            "version": "6.2",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.2",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.2.3",
                            "lessThanOrEqual": "6.2.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.3",
                            "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.2",
                                    "versionEndExcluding": "6.2.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.2",
                                    "versionEndExcluding": "6.3"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/c44adefdcf472f946f0632f4e0ddcbf3e00b8516"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b4ff830eca097df51af10a9be29e8cc817327919"
                }
            ],
            "title": "iommufd: Do not add the same hwpt to the ioas->hwpt_list twice",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}