Skip to contentSkip to conversation

CVE-2021-47301: igb: Fix use-after-free error during reset

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 21, 2024

lore
Share & tools
lore
#0 lore raw

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

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

igb: Fix use-after-free error during reset

Cleans the next descriptor to watch (next_to_watch) when cleaning the TX ring.

Failure to do so can cause invalid memory accesses. If igb_poll() runs while the controller is reset this can lead to the driver try to free a skb that was already freed.

(The crash is harder to reproduce with the igb driver, but the same potential problem exists as the code is identical to igc)

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

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

	Issue introduced in 4.12 with commit 7cc6fd4c60f2 and fixed in 4.14.241 with commit d7367f781e5a
	Issue introduced in 4.12 with commit 7cc6fd4c60f2 and fixed in 4.19.199 with commit d3ccb18ed5ac
	Issue introduced in 4.12 with commit 7cc6fd4c60f2 and fixed in 5.4.136 with commit 88e0720133d4
	Issue introduced in 4.12 with commit 7cc6fd4c60f2 and fixed in 5.10.54 with commit f153664d8e70
	Issue introduced in 4.12 with commit 7cc6fd4c60f2 and fixed in 5.13.6 with commit 8e24c12f2ff6
	Issue introduced in 4.12 with commit 7cc6fd4c60f2 and fixed in 5.14 with commit 7b292608db23

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

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/intel/igb/igb_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/d7367f781e5a9ca5df9082b15b272b55e76931f8
	https://git.kernel.org/stable/c/d3ccb18ed5ac3283c7b31ecc685b499e580d5492
	https://git.kernel.org/stable/c/88e0720133d42d34851c8721cf5f289a50a8710f
	https://git.kernel.org/stable/c/f153664d8e70c11d0371341613651e1130e20240
	https://git.kernel.org/stable/c/8e24c12f2ff6d32fd9f057382f08e748ec97194c
	https://git.kernel.org/stable/c/7b292608db23ccbbfbfa50cdb155d01725d7a52e