FlawAtlas
Search the atlas
UBUNTU-CVE-2025-21951 Moderate

UBUNTU-CVE-2025-21951

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.

Exploit probability Not scored
Published April 1, 2025
Required by Not available
Last source change August 17, 2026

02 / AFFECTED SOFTWARE

Affected packages

Ubuntu:22.04:LTS linux-starfive-6.5

11 explicit affected versions

Ubuntu:20.04:LTS linux-intel-iotg-5.15

45 explicit affected versions

Ubuntu:22.04:LTS linux-ibm

63 explicit affected versions

Ubuntu:18.04:LTS linux-oem

50 explicit affected versions

Ubuntu:18.04:LTS linux-aws-5.0

6 explicit affected versions

Ubuntu:20.04:LTS linux-aws-5.11

12 explicit affected versions

Ubuntu:22.04:LTS linux-oem-6.5

19 explicit affected versions

Ubuntu:20.04:LTS linux-raspi2

6 explicit affected versions

Ubuntu:22.04:LTS linux

73 explicit affected versions

Ubuntu:24.04:LTS linux-riscv

24 explicit affected versions

Ubuntu:22.04:LTS linux-gkeop

58 explicit affected versions

Ubuntu:22.04:LTS linux-azure

66 explicit affected versions

Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15

59 explicit affected versions

Ubuntu:22.04:LTS linux-riscv-6.5

10 explicit affected versions

Ubuntu:22.04:LTS linux-ibm-6.8

21 explicit affected versions

Ubuntu:24.04:LTS linux-oem-6.8

26 explicit affected versions

Ubuntu:22.04:LTS linux-gke

65 explicit affected versions

Ubuntu:22.04:LTS linux-azure-5.19

7 explicit affected versions

Ubuntu:22.04:LTS linux-raspi

64 explicit affected versions

Ubuntu:22.04:LTS linux-oracle-6.8

26 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-6.5

13 explicit affected versions

Ubuntu:24.04:LTS linux-nvidia

28 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.14

35 explicit affected versions

Ubuntu:Pro:FIPS-updates:22.04:LTS linux-gcp-fips

25 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-tegra

23 explicit affected versions

Ubuntu:20.04:LTS linux-gke-5.15

18 explicit affected versions

Ubuntu:Pro:FIPS-updates:22.04:LTS linux-azure-fips

24 explicit affected versions

Ubuntu:22.04:LTS linux-azure-fde

64 explicit affected versions

Ubuntu:24.04:LTS linux-oracle

31 explicit affected versions

Ubuntu:20.04:LTS linux-aws-5.13

13 explicit affected versions

Ubuntu:20.04:LTS linux-aws-5.8

4 explicit affected versions

Ubuntu:16.04:LTS linux-hwe-edge

23 explicit affected versions

Ubuntu:24.04:LTS linux

36 explicit affected versions

Ubuntu:24.04:LTS linux-raspi-realtime

1 explicit affected versions

Ubuntu:20.04:LTS linux-hwe-5.8

21 explicit affected versions

Ubuntu:20.04:LTS linux-hwe-5.13

16 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency-hwe-6.2

10 explicit affected versions

Ubuntu:24.04:LTS linux-aws

32 explicit affected versions

Ubuntu:24.04:LTS linux-hwe-6.11

6 explicit affected versions

Ubuntu:18.04:LTS linux-oracle-5.0

7 explicit affected versions

Ubuntu:20.04:LTS linux-riscv

12 explicit affected versions

Ubuntu:24.04:LTS linux-azure-6.11

6 explicit affected versions

Ubuntu:20.04:LTS linux-riscv-5.15

56 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.11

12 explicit affected versions

Ubuntu:22.04:LTS linux-azure-6.5

14 explicit affected versions

Ubuntu:22.04:LTS linux-intel-iot-realtime

1 explicit affected versions

Ubuntu:20.04:LTS linux-intel-5.13

7 explicit affected versions

Ubuntu:24.04:LTS linux-nvidia-tegra

4 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.13

12 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.11

12 explicit affected versions

Ubuntu:Pro:Realtime:22.04:LTS linux-realtime-6.8

25 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-tegra-igx

19 explicit affected versions

Ubuntu:22.04:LTS linux-azure-6.8

19 explicit affected versions

Ubuntu:24.04:LTS linux-gkeop

18 explicit affected versions

Ubuntu:18.04:LTS linux-hwe-edge

10 explicit affected versions

Ubuntu:18.04:LTS linux-gke-5.4

37 explicit affected versions

Ubuntu:24.04:LTS linux-azure-nvidia

6 explicit affected versions

Ubuntu:22.04:LTS linux-oracle-6.5

13 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency-hwe-6.8

24 explicit affected versions

Ubuntu:22.04:LTS linux-azure-fde-6.2

10 explicit affected versions

Ubuntu:Pro:Realtime:22.04:LTS linux-intel-iot-realtime

40 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.10

26 explicit affected versions

Ubuntu:Pro:FIPS-updates:24.04:LTS linux-azure-fips

1 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.13

13 explicit affected versions

Ubuntu:22.04:LTS linux-xilinx-zynqmp

14 explicit affected versions

Ubuntu:20.04:LTS linux-oem-5.6

29 explicit affected versions

Ubuntu:18.04:LTS linux-gcp-5.3

13 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency

70 explicit affected versions

Ubuntu:24.04:LTS linux-nvidia-lowlatency

25 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-6.8

25 explicit affected versions

Ubuntu:22.04:LTS linux-aws

65 explicit affected versions

Ubuntu:Pro:FIPS-updates:22.04:LTS linux-aws-fips

28 explicit affected versions

Ubuntu:18.04:LTS linux-gke-4.15

33 explicit affected versions

Ubuntu:22.04:LTS linux-riscv

23 explicit affected versions

Ubuntu:18.04:LTS linux-aws-5.3

10 explicit affected versions

Ubuntu:Pro:FIPS-updates:24.04:LTS linux-fips

4 explicit affected versions

Ubuntu:Pro:FIPS-updates:24.04:LTS linux-gcp-fips

3 explicit affected versions

Ubuntu:Nvidia-BlueField:24.04:LTS linux-bluefield

11 explicit affected versions

Ubuntu:20.04:LTS linux-hwe-5.11

12 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.8

7 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-6.2

12 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.15

56 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia

50 explicit affected versions

Ubuntu:22.04:LTS linux-oracle

66 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency-hwe-5.19

10 explicit affected versions

Ubuntu:22.04:LTS linux-oem-5.17

26 explicit affected versions

Ubuntu:24.04:LTS linux-azure

26 explicit affected versions

Ubuntu:Pro:FIPS-preview:22.04:LTS linux-azure-fips

1 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-6.8

20 explicit affected versions

Ubuntu:24.04:LTS linux-raspi

31 explicit affected versions

Ubuntu:22.04:LTS linux-azure-6.2

13 explicit affected versions

Ubuntu:24.04:LTS linux-ibm

30 explicit affected versions

Ubuntu:22.04:LTS linux-oem-6.0

16 explicit affected versions

Ubuntu:22.04:LTS linux-kvm

67 explicit affected versions

Ubuntu:24.04:LTS linux-gcp

34 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.15

54 explicit affected versions

Ubuntu:22.04:LTS linux-azure-fde-5.19

3 explicit affected versions

Ubuntu:24.04:LTS linux-gcp-6.11

5 explicit affected versions

Ubuntu:Pro:FIPS-preview:22.04:LTS linux-aws-fips

2 explicit affected versions

Ubuntu:20.04:LTS linux-gke

51 explicit affected versions

Ubuntu:24.04:LTS linux-oem-6.11

15 explicit affected versions

Ubuntu:Pro:Realtime:24.04:LTS linux-raspi-realtime

26 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.13

12 explicit affected versions

Ubuntu:22.04:LTS linux-intel-iotg

53 explicit affected versions

Ubuntu:22.04:LTS linux-oem-6.1

27 explicit affected versions

Ubuntu:Nvidia-BlueField:22.04:LTS linux-bluefield

40 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-6.8

27 explicit affected versions

Ubuntu:22.04:LTS linux-gcp-5.19

8 explicit affected versions

Ubuntu:Pro:FIPS-updates:22.04:LTS linux-fips

30 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.8

5 explicit affected versions

Ubuntu:24.04:LTS linux-intel

3 explicit affected versions

Ubuntu:22.04:LTS linux-riscv-5.19

8 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-6.2

10 explicit affected versions

Ubuntu:24.04:LTS linux-lowlatency-hwe-6.11

5 explicit affected versions

Ubuntu:Pro:Realtime:24.04:LTS linux-realtime

30 explicit affected versions

Ubuntu:22.04:LTS linux-lowlatency-hwe-6.5

13 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.11

13 explicit affected versions

Ubuntu:22.04:LTS linux-starfive-5.19

7 explicit affected versions

Ubuntu:24.04:LTS linux-nvidia-6.11

5 explicit affected versions

Ubuntu:20.04:LTS linux-azure-5.15

57 explicit affected versions

Ubuntu:20.04:LTS linux-riscv-5.8

10 explicit affected versions

Ubuntu:20.04:LTS linux-oracle-5.13

12 explicit affected versions

Ubuntu:Pro:20.04:LTS linux-nvidia-tegra-5.15

15 explicit affected versions

Ubuntu:18.04:LTS linux-azure

44 explicit affected versions

Ubuntu:18.04:LTS linux-azure-5.3

16 explicit affected versions

Ubuntu:22.04:LTS linux-starfive-6.2

3 explicit affected versions

Ubuntu:20.04:LTS linux-riscv-5.11

13 explicit affected versions

Ubuntu:20.04:LTS linux-azure-fde

26 explicit affected versions

Ubuntu:20.04:LTS linux-gkeop-5.15

45 explicit affected versions

Ubuntu:18.04:LTS linux-gkeop-5.4

37 explicit affected versions

Ubuntu:24.04:LTS linux-lowlatency

35 explicit affected versions

Ubuntu:22.04:LTS linux-aws-6.5

14 explicit affected versions

Ubuntu:18.04:LTS linux-gcp

38 explicit affected versions

Ubuntu:18.04:LTS linux-oracle-5.3

9 explicit affected versions

Ubuntu:20.04:LTS linux-aws-5.15

55 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-5.19

11 explicit affected versions

Ubuntu:22.04:LTS linux-riscv-6.8

24 explicit affected versions

Ubuntu:24.04:LTS linux-xilinx

8 explicit affected versions

Ubuntu:22.04:LTS linux-gcp

66 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-6.2

7 explicit affected versions

Ubuntu:20.04:LTS linux-ibm-5.15

35 explicit affected versions

Ubuntu:20.04:LTS linux-gcp-5.8

4 explicit affected versions

Ubuntu:24.04:LTS linux-realtime

1 explicit affected versions

Ubuntu:Pro:FIPS-preview:22.04:LTS linux-fips

1 explicit affected versions

Ubuntu:Pro:FIPS-preview:22.04:LTS linux-gcp-fips

1 explicit affected versions

Ubuntu:Pro:Realtime:22.04:LTS linux-realtime

64 explicit affected versions

Ubuntu:Pro:20.04:LTS linux-hwe-5.15

56 explicit affected versions

Ubuntu:22.04:LTS linux-hwe-6.5

13 explicit affected versions

Ubuntu:18.04:LTS linux-hwe

43 explicit affected versions

Ubuntu:22.04:LTS linux-aws-5.19

10 explicit affected versions

Ubuntu:22.04:LTS linux-allwinner-5.19

8 explicit affected versions

Ubuntu:24.04:LTS linux-gke

29 explicit affected versions

Ubuntu:22.04:LTS linux-aws-6.2

14 explicit affected versions

Ubuntu:18.04:LTS linux-azure-edge

4 explicit affected versions

Ubuntu:20.04:LTS linux-gkeop

78 explicit affected versions

Ubuntu:22.04:LTS linux-nvidia-6.5

11 explicit affected versions

Ubuntu:22.04:LTS linux-realtime

1 explicit affected versions

Ubuntu:Pro:FIPS-updates:24.04:LTS linux-aws-fips

3 explicit affected versions

Ubuntu:22.04:LTS linux-aws-6.8

23 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities UBUNTU-CVE-2025-21951

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.

View original source

05 / REFERENCES

Further evidence