Skip to contentSkip to conversation

CVE-2023-53499: virtio_net: Fix error unwinding of XDP initialization

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 1, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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

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

virtio_net: Fix error unwinding of XDP initialization

When initializing XDP in virtnet_open(), some rq xdp initialization may hit an error causing net device open failed. However, previous rqs have already initialized XDP and enabled NAPI, which is not the expected behavior. Need to roll back the previous rq initialization to avoid leaks in error unwinding of init code.

Also extract helper functions of disable and enable queue pairs. Use newly introduced disable helper function in error unwinding and virtnet_close. Use enable helper function in virtnet_open.

The Linux kernel CVE team has assigned CVE-2023-53499 to this issue.

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

	Issue introduced in 4.16 with commit 754b8a21a96d5f11712245aef907149606b323ae and fixed in 5.15.113 with commit 6a7690f2bd178eee80f33411ae32e543ae66379c
	Issue introduced in 4.16 with commit 754b8a21a96d5f11712245aef907149606b323ae and fixed in 6.1.30 with commit 73f53bc295727a3cdbd9d6bcdfaa239258970cf4
	Issue introduced in 4.16 with commit 754b8a21a96d5f11712245aef907149606b323ae and fixed in 6.3.4 with commit 037768b28e3752c07d63d1c72a651a6775b080bb
	Issue introduced in 4.16 with commit 754b8a21a96d5f11712245aef907149606b323ae and fixed in 6.4 with commit 5306623a9826aa7d63b32c6a3803c798a765474d

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-2023-53499

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/virtio_net.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/6a7690f2bd178eee80f33411ae32e543ae66379c
	https://git.kernel.org/stable/c/73f53bc295727a3cdbd9d6bcdfaa239258970cf4
	https://git.kernel.org/stable/c/037768b28e3752c07d63d1c72a651a6775b080bb
	https://git.kernel.org/stable/c/5306623a9826aa7d63b32c6a3803c798a765474d