{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-54326",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-12-30T12:35:56.209Z",
        "datePublished": "2025-12-30T12:37:09.698Z",
        "dateUpdated": "2026-08-05T09:19:17.990Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:19:17.990Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmisc: pci_endpoint_test: Free IRQs before removing the device\n\nIn pci_endpoint_test_remove(), freeing the IRQs after removing the device\ncreates a small race window for IRQs to be received with the test device\nmemory already released, causing the IRQ handler to access invalid memory,\nresulting in an oops.\n\nFree the device IRQs before removing the device to avoid this issue."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The vulnerable window is opened by a local driver-removal event (sysfs unbind/rmmod/hot-unplug) and the interrupt storm that hits it is driven through local interfaces — the `/dev/pci-endpoint-test.N` ioctls that command the endpoint to raise MSI/MSI-X/legacy IRQs. There is no network-reachable path to this host-side test driver.\nAC:L - The attacker controls the interrupt side of the race directly and continuously (looping `PCITEST_MSI`/`PCITEST_LEGACY_IRQ`, or free-running MSIs from the attached endpoint), so the handler is guaranteed to be in flight whenever teardown runs; `IRQF_SHARED` legacy lines widen it further, and the race can be retried on every unbind cycle.\nPR:L - No capability check exists anywhere in `pci_endpoint_test_ioctl()` or the IRQ path — an unprivileged local context with the device node open sustains the interrupt stream that lands in the window, and the removal side is a routine hot-unplug/unbind event rather than a privilege the attacker must hold.\nUI:N - Nothing requires a victim to open a file, mount a filesystem, or interact with attacker-supplied content; the race is won purely by the attacker's own interrupt generation against a system/administrative removal event.\nS:U - The dangling iomem and heap accesses stay entirely within the kernel's own security authority — no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - `kfree(test->name)` leaves `irqaction->name` dangling while the IRQ is still registered, so freed kernel heap contents are rendered to userspace via `/proc/interrupts`, and the handler's `readl()` through the unmapped `test->base` can read a recycled vmalloc/ioremap mapping — a use-after-free read primitive.\nI:H - The handler performs `writel(test, PCI_ENDPOINT_TEST_STATUS, reg)` through the already-`pci_iounmap()`'d pointer, a stale-pointer write into a virtual range that a concurrent `ioremap()`/`vmalloc()` may already own; per use-after-free treatment this is exploitable for memory corruption and control-flow influence.\nA:H - The commit states the outcome explicitly — the IRQ handler touches released device memory and the kernel oopses; a fault taken in hard-IRQ context during device teardown is an immediate crash."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/misc/pci_endpoint_test.c"
                    ],
                    "versions": [
                        {
                            "version": "e03327122e2c8e6ae4565ef5b3d3cbe4364546a1",
                            "lessThan": "fb7f8bdb886f2ebf35ee5edaf2bf5f02b063ddb7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e03327122e2c8e6ae4565ef5b3d3cbe4364546a1",
                            "lessThan": "dd2210379205fcd23a9d8869b0cef90e3770577c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e03327122e2c8e6ae4565ef5b3d3cbe4364546a1",
                            "lessThan": "cdf9a7e2cdc7a5464e3cc6d0b715ba2b1d215521",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e03327122e2c8e6ae4565ef5b3d3cbe4364546a1",
                            "lessThan": "14bdee38e96c7d37ca15e7bea50411eee25fe315",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e03327122e2c8e6ae4565ef5b3d3cbe4364546a1",
                            "lessThan": "c2dba13bc0c62b79a3cbe4bfe5faa32231bf9b55",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e03327122e2c8e6ae4565ef5b3d3cbe4364546a1",
                            "lessThan": "38d12bcf4e2ce3d285eb29644a79a54f42040fab",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e03327122e2c8e6ae4565ef5b3d3cbe4364546a1",
                            "lessThan": "f61b7634a3249d12b9daa36ffbdb9965b6f24c6c",
                            "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/misc/pci_endpoint_test.c"
                    ],
                    "versions": [
                        {
                            "version": "4.19",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.19",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.291",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.251",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.188",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.121",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.40",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.4.5",
                            "lessThanOrEqual": "6.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.5",
                            "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": "4.19",
                                    "versionEndExcluding": "4.19.291"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "5.4.251"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "5.10.188"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "5.15.121"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.1.40"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.4.5"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.19",
                                    "versionEndExcluding": "6.5"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/fb7f8bdb886f2ebf35ee5edaf2bf5f02b063ddb7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/dd2210379205fcd23a9d8869b0cef90e3770577c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/cdf9a7e2cdc7a5464e3cc6d0b715ba2b1d215521"
                },
                {
                    "url": "https://git.kernel.org/stable/c/14bdee38e96c7d37ca15e7bea50411eee25fe315"
                },
                {
                    "url": "https://git.kernel.org/stable/c/c2dba13bc0c62b79a3cbe4bfe5faa32231bf9b55"
                },
                {
                    "url": "https://git.kernel.org/stable/c/38d12bcf4e2ce3d285eb29644a79a54f42040fab"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f61b7634a3249d12b9daa36ffbdb9965b6f24c6c"
                }
            ],
            "title": "misc: pci_endpoint_test: Free IRQs before removing the device",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}