CVE-2025-21951
bus: mhi: host: pci_generic: Use pci_try_reset_function() to avoid deadlock
Check your servers for CVE-2025-21951
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-21951 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.44% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 1 Oct 2025):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-667 Improper Locking
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 7389337f0a78ea099c47f0af08f64f20c52ab4ba, before 7746f3bb8917fccb4571a576f3837d80fc513054 affected from 7389337f0a78ea099c47f0af08f64f20c52ab4ba, before 7a5ffadd54fe2662f5c99cdccf30144d060376f7 affected from 7389337f0a78ea099c47f0af08f64f20c52ab4ba, before 1f9eb7078bc6b5fb5cbfbcb37c4bc01685332b95 affected from 7389337f0a78ea099c47f0af08f64f20c52ab4ba, before 985d3cf56d8745ca637deee273929e01df449f85 affected from 7389337f0a78ea099c47f0af08f64f20c52ab4ba, before 62505657475c245c9cd46e42ac01026d1e61f027 affected from 7389337f0a78ea099c47f0af08f64f20c52ab4ba, before a321d163de3d8aa38a6449ab2becf4b1581aed96
Other versions: unaffected
|
| Linux |
affected 5.12 unaffected before 5.12 unaffected from 5.15.179 up to and including 5.15.* unaffected from 6.1.131 up to and including 6.1.* unaffected from 6.6.83 up to and including 6.6.* unaffected from 6.12.19 up to and including 6.12.* unaffected from 6.13.7 up to and including 6.13.* unaffected 6.14 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-21951 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-21951
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-21951
trivy image --scanners vuln IMAGE | grep CVE-2025-21951
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/7746f3bb8917fccb4571a576f3837d80fc513054 git.kernel.org
- https://git.kernel.org/stable/c/7a5ffadd54fe2662f5c99cdccf30144d060376f7 git.kernel.org
- https://git.kernel.org/stable/c/1f9eb7078bc6b5fb5cbfbcb37c4bc01685332b95 git.kernel.org
- https://git.kernel.org/stable/c/985d3cf56d8745ca637deee273929e01df449f85 git.kernel.org
- https://git.kernel.org/stable/c/62505657475c245c9cd46e42ac01026d1e61f027 git.kernel.org
- https://git.kernel.org/stable/c/a321d163de3d8aa38a6449ab2becf4b1581aed96 git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html lists.debian.org
Source: the record CVE-2025-21951 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse