| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2021-47278: bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove() |
| |
| 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. |
| |
| The Linux kernel CVE team has assigned CVE-2021-47278 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.12 with commit 8562d4fe34a3ef52da077f77985994bb9ad1f83e and fixed in 5.12.11 with commit c597d5c59c7a6417dba06590f59b922e01188e8d |
| Issue introduced in 5.12 with commit 8562d4fe34a3ef52da077f77985994bb9ad1f83e and fixed in 5.13 with commit 0b67808ade8893a1b3608ddd74fac7854786c919 |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2021-47278 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| drivers/bus/mhi/pci_generic.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| https://git.kernel.org/stable/c/c597d5c59c7a6417dba06590f59b922e01188e8d |
| https://git.kernel.org/stable/c/0b67808ade8893a1b3608ddd74fac7854786c919 |