Skip to contentSkip to conversation

CVE-2021-47141: gve: Add NULL pointer checks when freeing irqs.

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 25, 2024

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

gve: Add NULL pointer checks when freeing irqs.

When freeing notification blocks, we index priv->msix_vectors. If we failed to allocate priv->msix_vectors (see abort_with_msix_vectors) this could lead to a NULL pointer dereference if the driver is unloaded.

The Linux kernel CVE team has assigned CVE-2021-47141 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.3 with commit 893ce44df565 and fixed in 5.4.124 with commit 821149ee88c2
	Issue introduced in 5.3 with commit 893ce44df565 and fixed in 5.10.42 with commit da21a35c00ff
	Issue introduced in 5.3 with commit 893ce44df565 and fixed in 5.12.9 with commit 5278c75266c5
	Issue introduced in 5.3 with commit 893ce44df565 and fixed in 5.13 with commit 5218e919c8d0

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-47141

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/net/ethernet/google/gve/gve_main.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/821149ee88c206fa37e79c1868cc270518484876
	https://git.kernel.org/stable/c/da21a35c00ff1a1794d4f166d3b3fa8db4d0f6fb
	https://git.kernel.org/stable/c/5278c75266c5094d3c0958793bf12fc90300e580
	https://git.kernel.org/stable/c/5218e919c8d06279884aa0baf76778a6817d5b93