CVE-2021-47049: Drivers: hv: vmbus: Use after free in __vmbus_open()
From: [email protected]
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
Drivers: hv: vmbus: Use after free in __vmbus_open()
The "open_info" variable is added to the &vmbus_connection.chn_msg_list, but the error handling frees "open_info" without removing it from the list. This will result in a use after free. First remove it from the list, and then free it.
The Linux kernel CVE team has assigned CVE-2021-47049 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.14 with commit 6f3d791f3006 and fixed in 5.10.37 with commit d5c7b42c9f56 Issue introduced in 4.14 with commit 6f3d791f3006 and fixed in 5.11.21 with commit f37dd5d1b5d3 Issue introduced in 4.14 with commit 6f3d791f3006 and fixed in 5.12.4 with commit 2728f289b327 Issue introduced in 4.14 with commit 6f3d791f3006 and fixed in 5.13 with commit 3e9bf43f7f7a
Please see https://www.kernel.org or 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-47049
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/hv/channel.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/d5c7b42c9f56ca46b286daa537d181bd7f69214f https://git.kernel.org/stable/c/f37dd5d1b5d38a79a4f7b8dd7bbb705505f05560 https://git.kernel.org/stable/c/2728f289b3270b0e273292b46c534421a33bbfd5 https://git.kernel.org/stable/c/3e9bf43f7f7a46f21ec071cb47be92d0874c48da