# CVE-2025-21951: bus: mhi: host: pci\_generic: Use pci\_try\_reset\_function() to avoid deadlock

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; 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.22% (percentile 7, 2026-11-28)
- **CWE:** CWE-667
- **Published:** 2025-04-01T15:41:11.487Z
- **Modified:** 2026-06-17T08:44:41.577Z

## Who should check

- Anyone running Linux \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 7746f3bb8917fccb4571a576f3837d80fc513054; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 7a5ffadd54fe2662f5c99cdccf30144d060376f7; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 1f9eb7078bc6b5fb5cbfbcb37c4bc01685332b95; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 985d3cf56d8745ca637deee273929e01df449f85; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 62505657475c245c9cd46e42ac01026d1e61f027; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< a321d163de3d8aa38a6449ab2becf4b1581aed96
- Anyone running Linux 5.12

## Description

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

bus: mhi: host: pci\_generic: Use pci\_try\_reset\_function() to avoid deadlock

There are multiple places from where the recovery work gets scheduled
asynchronously. Also, there are multiple places where the caller waits
synchronously for the recovery to be completed. One such place is during
the PM shutdown() callback.

If the device is not alive during recovery\_work, it will try to reset the
device using pci\_reset\_function(). This function internally will take the
device\_lock() first before resetting the device. By this time, if the lock
has already been acquired, then recovery\_work will get stalled while
waiting for the lock. And if the lock was already acquired by the caller
which waits for the recovery\_work to be completed, it will lead to
deadlock.

This is what happened on the X1E80100 CRD device when the device died
before shutdown() callback. Driver core calls the driver's shutdown()
callback while holding the device\_lock() leading to deadlock.

And this deadlock scenario can occur on other paths as well, like during
the PM suspend() callback, where the driver core would hold the
device\_lock() before calling driver's suspend() callback. And if the
recovery\_work was already started, it could lead to deadlock. This is also
observed on the X1E80100 CRD.

So to fix both issues, use pci\_try\_reset\_function() in recovery\_work. This
function first checks for the availability of the device\_lock() before
trying to reset the device. If the lock is available, it will acquire it
and reset the device. Otherwise, it will return -EAGAIN. If that happens,
recovery\_work will fail with the error message "Recovery failed" as not
much could be done.

## Affected and fixed versions

- Linux: \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 7746f3bb8917fccb4571a576f3837d80fc513054; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 7a5ffadd54fe2662f5c99cdccf30144d060376f7; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 1f9eb7078bc6b5fb5cbfbcb37c4bc01685332b95; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 985d3cf56d8745ca637deee273929e01df449f85; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 62505657475c245c9cd46e42ac01026d1e61f027; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< a321d163de3d8aa38a6449ab2becf4b1581aed96 (cvelist)
- Linux: 5.12 (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-2025-21951. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21951.md
Affected: Linux >= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, < 7746f3bb8917fccb4571a576f3837d80fc513054; >= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, < 7a5ffadd54fe2662f5c99cdccf30144d060376f7; >= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, < 1f9eb7078bc6b5fb5cbfbcb37c4bc01685332b95; >= 7389337f0a78ea099c47f0a…
Fixed in: Linux 7746f3bb8917fccb4571a576f3837d80fc513054, Linux 7a5ffadd54fe2662f5c99cdccf30144d060376f7, Linux 1f9eb7078bc6b5fb5cbfbcb37c4bc01685332b95, Linux 985d3cf56d8745ca637deee273929e01df449f85, Linux 62505657475c245c9cd46e42ac01026d1e61f027

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-2025-21951 being exploited?

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

### How serious is CVE-2025-21951?

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

### Which versions are affected by CVE-2025-21951?

Linux \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 7746f3bb8917fccb4571a576f3837d80fc513054; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 7a5ffadd54fe2662f5c99cdccf30144d060376f7; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 1f9eb7078bc6b5fb5cbfbcb37c4bc01685332b95; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 985d3cf56d8745ca637deee273929e01df449f85; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< 62505657475c245c9cd46e42ac01026d1e61f027; \>= 7389337f0a78ea099c47f0af08f64f20c52ab4ba, \< a321d163de3d8aa38a6449ab2becf4b1581aed96; Linux 5.12.

### Is there a fix for CVE-2025-21951?

Yes. Fixed in Linux 7746f3bb8917fccb4571a576f3837d80fc513054, Linux 7a5ffadd54fe2662f5c99cdccf30144d060376f7, Linux 1f9eb7078bc6b5fb5cbfbcb37c4bc01685332b95, Linux 985d3cf56d8745ca637deee273929e01df449f85, Linux 62505657475c245c9cd46e42ac01026d1e61f027. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-21951?

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/7746f3bb8917fccb4571a576f3837d80fc513054>
- patch: <https://git.kernel.org/stable/c/7a5ffadd54fe2662f5c99cdccf30144d060376f7>
- patch: <https://git.kernel.org/stable/c/1f9eb7078bc6b5fb5cbfbcb37c4bc01685332b95>
- patch: <https://git.kernel.org/stable/c/985d3cf56d8745ca637deee273929e01df449f85>
- patch: <https://git.kernel.org/stable/c/62505657475c245c9cd46e42ac01026d1e61f027>
- patch: <https://git.kernel.org/stable/c/a321d163de3d8aa38a6449ab2becf4b1581aed96>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.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-2025-21951>

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