{"id":"CVE-2023-52617","aliases":["CVE-2023-52617"],"related":[],"kind":"vulnerability","state":"published","title":"PCI: switchtec: Fix stdev_release() crash after surprise hot remove","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nPCI: switchtec: Fix stdev_release() crash after surprise hot remove\n\nA PCI device hot removal may occur while stdev->cdev is held open. The call\nto stdev_release() then happens during close or exit, at a point way past\nswitchtec_pci_remove(). Otherwise the last ref would vanish with the\ntrailing put_device(), just before return.\n\nAt that later point in time, the devm cleanup has already removed the\nstdev->mmio_mrpc mapping. Also, the stdev->pdev reference was not a counted\none. Therefore, in DMA mode, the iowrite32() in stdev_release() will cause\na fatal page fault, and the subsequent dma_free_coherent(), if reached,\nwould pass a stale &stdev->pdev->dev pointer.\n\nFix by moving MRPC DMA shutdown into switchtec_pci_remove(), after\nstdev_kill(). Counting the stdev->pdev ref is now optional, but may prevent\nfuture accidents.\n\nReproducible via the script at\nhttps://lore.kernel.org/r/20231113212150.96410-1-dns@arista.com","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nPCI: switchtec: Fix stdev_release() crash after surprise hot remove\n\nA PCI device hot removal may occur while stdev->cdev is held open. The call\nto stdev_release() then happens during close or exit, at a point way past\nswitchtec_pci_remove(). Otherwise the last ref would vanish with the\ntrailing put_device(), just before return.\n\nAt that later point in time, the devm cleanup has already removed the\nstdev->mmio_mrpc mapping. Also, the stdev->pdev reference was not a counted\none. Therefore, in DMA mode, the iowrite32() in stdev_release() will cause\na fatal page fault, and the subsequent dma_free_coherent(), if reached,\nwould pass a stale &stdev->pdev->dev pointer.\n\nFix by moving MRPC DMA shutdown into switchtec_pci_remove(), after\nstdev_kill(). Counting the stdev->pdev ref is now optional, but may prevent\nfuture accidents.\n\nReproducible via the script at\nhttps://lore.kernel.org/r/20231113212150.96410-1-dns@arista.com","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: PCI: switchtec: corrige el bloqueo de stdev_release() después de una eliminación sorpresa en caliente. Puede ocurrir una eliminación en caliente del dispositivo PCI mientras stdev-&gt;cdev se mantiene abierto. La llamada a stdev_release() ocurre durante el cierre o la salida, en un punto mucho más allá de switchtec_pci_remove(). De lo contrario, la última referencia desaparecería con el put_device() final, justo antes del retorno. En ese momento posterior, la limpieza devm ya eliminó la asignación stdev-&gt;mmio_mrpc. Además, la referencia stdev-&gt;pdev no se contaba. Por lo tanto, en modo DMA, iowrite32() en stdev_release() causará un error de página fatal, y el dma_free_coherent() posterior, si se alcanza, pasaría un puntero &amp;stdev-&gt;pdev-&gt;dev obsoleto. Para solucionarlo, mueva el apagado de MRPC DMA a switchtec_pci_remove(), después de stdev_kill(). Contar stdev-&gt;pdev ref ahora es opcional, pero puede evitar accidentes futuros. Reproducible a través del script en https://lore.kernel.org/r/20231113212150.96410-1-dns@arista.com","source":"nvd"}],"published":"2024-03-18T10:19:04.651Z","modified":"2026-06-17T06:43:10.370Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H","score":4.4,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H","score":4.4,"rating":"MEDIUM"}],"cwes":["CWE-459"],"affected":[{"ranges":[{"type":"git","introduced":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","fixed":"d8c293549946ee5078ed0ab77793cec365559355","status":"affected"},{"type":"git","introduced":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","fixed":"4a5d0528cf19dbf060313dffbe047bc11c90c24c","status":"affected"},{"type":"git","introduced":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","fixed":"ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8","status":"affected"},{"type":"git","introduced":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","fixed":"1d83c85922647758c1f1e4806a4c5c3cf591a20a","status":"affected"},{"type":"git","introduced":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","fixed":"0233b836312e39a3c763fb53512b3fa455b473b3","status":"affected"},{"type":"git","introduced":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","fixed":"e129c7fa7070fbce57feb0bfc5eaa65eef44b693","status":"affected"},{"type":"git","introduced":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","fixed":"df25461119d987b8c81d232cfe4411e91dcabe66","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.0","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.0","status":"unaffected"},{"type":"semver","introduced":"5.4.269","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.210","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.149","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.77","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.16","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.7.4","lastAffected":"6.7.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.8","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"5.4.269"},{"status":"affected","introduced":"5.5","fixed":"5.10.210"},{"status":"affected","introduced":"5.11","fixed":"5.15.149"},{"status":"affected","introduced":"5.16","fixed":"6.1.77"},{"status":"affected","introduced":"6.2","fixed":"6.6.16"},{"status":"affected","introduced":"6.7","fixed":"6.7.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/d8c293549946ee5078ed0ab77793cec365559355","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4a5d0528cf19dbf060313dffbe047bc11c90c24c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1d83c85922647758c1f1e4806a4c5c3cf591a20a","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0233b836312e39a3c763fb53512b3fa455b473b3","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e129c7fa7070fbce57feb0bfc5eaa65eef44b693","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/df25461119d987b8c81d232cfe4411e91dcabe66","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-10T20:25:20.462Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-52617","url":"https://www.cve.org/CVERecord?id=CVE-2023-52617","licence":"CVE Terms of Use","modified":"2026-05-11T19:30:26.843Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-52617","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52617","licence":"Public domain","modified":"2026-06-17T06:43:10.370Z"}],"updatedAt":"2026-11-25T22:58:33.359Z","epss":{"score":0.00237,"percentile":0.15749,"date":"2026-12-01T12:00:22.000Z"}}