CVE-2021-47319: virtio-blk: Fix memory leak among suspend/resume procedure
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
virtio-blk: Fix memory leak among suspend/resume procedure
The vblk->vqs should be freed before we call init_vqs() in virtblk_restore().
The Linux kernel CVE team has assigned CVE-2021-47319 to this issue.
Affected and fixed versions
===========================
Fixed in 4.4.276 with commit 381bde79d11e Fixed in 4.9.276 with commit 102d6bc6475a Fixed in 4.14.240 with commit 863da837964c Fixed in 4.19.198 with commit 600942d2fd49 Fixed in 5.4.134 with commit 04c6e60b884c Fixed in 5.10.52 with commit cd24da0db9f7 Fixed in 5.12.19 with commit ca2b8ae93a6d Fixed in 5.13.4 with commit 29a2f4a3214a Fixed in 5.14 with commit b71ba22e7c6c
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-47319
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/block/virtio_blk.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/381bde79d11e596002edfd914e6714291826967a https://git.kernel.org/stable/c/102d6bc6475ab09bab579c18704e6cf8d898e93c https://git.kernel.org/stable/c/863da837964c80c72e368a4f748c30d25daa1815 https://git.kernel.org/stable/c/600942d2fd49b90e44857d20c774b20d16f3130f https://git.kernel.org/stable/c/04c6e60b884cb5e94ff32af46867fb41d5848358 https://git.kernel.org/stable/c/cd24da0db9f75ca11eaf6060f0ccb90e2f3be3b0 https://git.kernel.org/stable/c/ca2b8ae93a6da9839dc7f9eb9199b18aa03c3dae https://git.kernel.org/stable/c/29a2f4a3214aa14d61cc9737c9f886dae9dbb710 https://git.kernel.org/stable/c/b71ba22e7c6c6b279c66f53ee7818709774efa1f