{"id":"CVE-2023-52617","state":"PUBLISHED","title":"PCI: switchtec: Fix stdev_release() crash after surprise hot remove","description":"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","publishedAt":"2024-03-18T10:19:04.651Z","updatedAt":"2026-05-11T19:30:26.843Z","severity":{"score":4.4,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H","source":"CISA-ADP"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"d8c293549946ee5078ed0ab77793cec365559355","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"4a5d0528cf19dbf060313dffbe047bc11c90c24c","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"1d83c85922647758c1f1e4806a4c5c3cf591a20a","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"0233b836312e39a3c763fb53512b3fa455b473b3","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"e129c7fa7070fbce57feb0bfc5eaa65eef44b693","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"df25461119d987b8c81d232cfe4411e91dcabe66","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pci/switch/switchtec.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"5.4.269","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.210","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.149","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.77","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.16","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.4","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pci/switch/switchtec.c"]}],"references":["https://git.kernel.org/stable/c/d8c293549946ee5078ed0ab77793cec365559355","https://git.kernel.org/stable/c/4a5d0528cf19dbf060313dffbe047bc11c90c24c","https://git.kernel.org/stable/c/ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8","https://git.kernel.org/stable/c/1d83c85922647758c1f1e4806a4c5c3cf591a20a","https://git.kernel.org/stable/c/0233b836312e39a3c763fb53512b3fa455b473b3","https://git.kernel.org/stable/c/e129c7fa7070fbce57feb0bfc5eaa65eef44b693","https://git.kernel.org/stable/c/df25461119d987b8c81d232cfe4411e91dcabe66","https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52617.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52617","state":"PUBLISHED","datePublished":"2024-03-18T10:19:04.651Z","dateUpdated":"2026-05-11T19:30:26.843Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-03-06T09:52:12.089Z"},"containers":{"cna":{"title":"PCI: switchtec: Fix stdev_release() crash after surprise hot remove","descriptions":[{"lang":"en","value":"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"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"d8c293549946ee5078ed0ab77793cec365559355","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"4a5d0528cf19dbf060313dffbe047bc11c90c24c","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"1d83c85922647758c1f1e4806a4c5c3cf591a20a","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"0233b836312e39a3c763fb53512b3fa455b473b3","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"e129c7fa7070fbce57feb0bfc5eaa65eef44b693","versionType":"git"},{"version":"f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35","status":"affected","lessThan":"df25461119d987b8c81d232cfe4411e91dcabe66","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pci/switch/switchtec.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.0","versionType":"semver"},{"version":"5.4.269","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.210","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.149","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.77","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.16","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.4","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/pci/switch/switchtec.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/d8c293549946ee5078ed0ab77793cec365559355"},{"url":"https://git.kernel.org/stable/c/4a5d0528cf19dbf060313dffbe047bc11c90c24c"},{"url":"https://git.kernel.org/stable/c/ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8"},{"url":"https://git.kernel.org/stable/c/1d83c85922647758c1f1e4806a4c5c3cf591a20a"},{"url":"https://git.kernel.org/stable/c/0233b836312e39a3c763fb53512b3fa455b473b3"},{"url":"https://git.kernel.org/stable/c/e129c7fa7070fbce57feb0bfc5eaa65eef44b693"},{"url":"https://git.kernel.org/stable/c/df25461119d987b8c81d232cfe4411e91dcabe66"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:30:26.843Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.4.269"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.10.210"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"5.15.149"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.1.77"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.6.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.7.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0","versionEndExcluding":"6.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":4.4,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"HIGH","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2025-04-10T20:25:20.462363Z","id":"CVE-2023-52617","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-04-10T20:25:39.733Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/d8c293549946ee5078ed0ab77793cec365559355","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/4a5d0528cf19dbf060313dffbe047bc11c90c24c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1d83c85922647758c1f1e4806a4c5c3cf591a20a","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/0233b836312e39a3c763fb53512b3fa455b473b3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e129c7fa7070fbce57feb0bfc5eaa65eef44b693","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/df25461119d987b8c81d232cfe4411e91dcabe66","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T23:03:21.360Z"}}]}}}