CVE-2021-47278
JSON

7.8high

bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove()

Severity
7.8high CVSS:3.1 by NVD
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove() This driver's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 8562d4fe34a3ef52da077f77985994bb9ad1f83e before c597d5c59c7a6417dba06590f59b922e01188e8d, from 8562d4fe34a3ef52da077f77985994bb9ad1f83e before 0b67808ade8893a1b3608ddd74fac7854786c919, 5.12
Not affected: before 5.12, from 5.12.11 up to 5.12.*, from 5.13 up to *
CVE List
linux linux_kernelfrom 5.12 before 5.12.11, 5.13NVD

Classification

CWE-416

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove() This driver's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bus: mhi: pci_generic: corrige posible use after free en mhi_pci_remove(). La ruta de eliminación de este controlador llama a del_timer(). Sin embargo, esa función no espera hasta que finalice el controlador del temporizador. Esto significa que es posible que el controlador del temporizador aún esté ejecutándose después de que haya finalizado la función de eliminación del controlador, lo que daría como resultado un use after free. Para solucionarlo, llame a del_timer_sync(), lo que garantiza que el controlador del temporizador haya finalizado y no pueda reprogramarse.

References

Sources

SourceRecordLicence
CVE ListCVE-2021-47278 changed 2026-05-11CVE Terms of Use
NVDCVE-2021-47278 changed 2026-06-17Public domain