# CVE-2023-52617: PCI: switchtec: Fix stdev\_release() crash after surprise hot remove

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.4
- **CVSS:** 4.4 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: High; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 16, 2026-11-26)
- **CWE:** CWE-459
- **Published:** 2024-03-18T10:19:04.651Z
- **Modified:** 2026-06-17T06:43:10.370Z

## Who should check

- Anyone running Linux \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< d8c293549946ee5078ed0ab77793cec365559355; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< 4a5d0528cf19dbf060313dffbe047bc11c90c24c; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< 1d83c85922647758c1f1e4806a4c5c3cf591a20a; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< 0233b836312e39a3c763fb53512b3fa455b473b3; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< e129c7fa7070fbce57feb0bfc5eaa65eef44b693; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< df25461119d987b8c81d232cfe4411e91dcabe66
- Anyone running Linux 5.0

## Description

In the Linux kernel, the following vulnerability has been resolved:

PCI: switchtec: Fix stdev\_release() crash after surprise hot remove

A PCI device hot removal may occur while stdev-\>cdev is held open. The call
to stdev\_release() then happens during close or exit, at a point way past
switchtec\_pci\_remove(). Otherwise the last ref would vanish with the
trailing put\_device(), just before return.

At that later point in time, the devm cleanup has already removed the
stdev-\>mmio\_mrpc mapping. Also, the stdev-\>pdev reference was not a counted
one. Therefore, in DMA mode, the iowrite32() in stdev\_release() will cause
a fatal page fault, and the subsequent dma\_free\_coherent(), if reached,
would pass a stale &stdev-\>pdev-\>dev pointer.

Fix by moving MRPC DMA shutdown into switchtec\_pci\_remove(), after
stdev\_kill(). Counting the stdev-\>pdev ref is now optional, but may prevent
future accidents.

Reproducible via the script at
https://lore.kernel.org/r/20231113212150.96410-1-dns@arista.com

## Affected and fixed versions

- Linux: \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< d8c293549946ee5078ed0ab77793cec365559355; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< 4a5d0528cf19dbf060313dffbe047bc11c90c24c; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< 1d83c85922647758c1f1e4806a4c5c3cf591a20a; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< 0233b836312e39a3c763fb53512b3fa455b473b3; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< e129c7fa7070fbce57feb0bfc5eaa65eef44b693; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< df25461119d987b8c81d232cfe4411e91dcabe66 (cvelist)
- Linux: 5.0 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-52617. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52617.md
Affected: Linux >= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, < d8c293549946ee5078ed0ab77793cec365559355; >= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, < 4a5d0528cf19dbf060313dffbe047bc11c90c24c; >= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, < ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8; >= f7eb7b8a4f72b0d9dea69b0…
Fixed in: Linux 4a5d0528cf19dbf060313dffbe047bc11c90c24c, Linux 1d83c85922647758c1f1e4806a4c5c3cf591a20a, Linux 0233b836312e39a3c763fb53512b3fa455b473b3

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-52617 being exploited?

There is no confirmed exploitation: CVE-2023-52617 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-52617?

Medium: CVSS 4.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-52617?

Linux \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< d8c293549946ee5078ed0ab77793cec365559355; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< 4a5d0528cf19dbf060313dffbe047bc11c90c24c; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< 1d83c85922647758c1f1e4806a4c5c3cf591a20a; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< 0233b836312e39a3c763fb53512b3fa455b473b3; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< e129c7fa7070fbce57feb0bfc5eaa65eef44b693; \>= f7eb7b8a4f72b0d9dea69b09f58185ffab97fd35, \< df25461119d987b8c81d232cfe4411e91dcabe66; Linux 5.0.

### Is there a fix for CVE-2023-52617?

Yes. Fixed in Linux 4a5d0528cf19dbf060313dffbe047bc11c90c24c, Linux 1d83c85922647758c1f1e4806a4c5c3cf591a20a, Linux 0233b836312e39a3c763fb53512b3fa455b473b3. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-52617?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d8c293549946ee5078ed0ab77793cec365559355>
- patch: <https://git.kernel.org/stable/c/4a5d0528cf19dbf060313dffbe047bc11c90c24c>
- patch: <https://git.kernel.org/stable/c/ff1c7e2fb9e9c3f53715fbe04d3ac47b80be7eb8>
- patch: <https://git.kernel.org/stable/c/1d83c85922647758c1f1e4806a4c5c3cf591a20a>
- patch: <https://git.kernel.org/stable/c/0233b836312e39a3c763fb53512b3fa455b473b3>
- patch: <https://git.kernel.org/stable/c/e129c7fa7070fbce57feb0bfc5eaa65eef44b693>
- patch: <https://git.kernel.org/stable/c/df25461119d987b8c81d232cfe4411e91dcabe66>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-52617>

HTML: <https://flawdb.com/CVE-2023-52617> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-52617>
