Skip to contentSkip to conversation

CVE-2026-23326: xsk: Fix fragment node deletion to prevent buffer leak

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 25

lore
Share & tools
lore
#0 lore raw

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

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

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

xsk: Fix fragment node deletion to prevent buffer leak

After commit b692bf9a7543 ("xsk: Get rid of xdp_buff_xsk::xskb_list_node"), the list_node field is reused for both the xskb pool list and the buffer free list, this causes a buffer leak as described below.

xp_free() checks if a buffer is already on the free list using list_empty(&xskb->list_node). When list_del() is used to remove a node from the xskb pool list, it doesn't reinitialize the node pointers. This means list_empty() will return false even after the node has been removed, causing xp_free() to incorrectly skip adding the buffer to the free list.

Fix this by using list_del_init() instead of list_del() in all fragment handling paths, this ensures the list node is reinitialized after removal, allowing the list_empty() to work correctly.

The Linux kernel CVE team has assigned CVE-2026-23326 to this issue.

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

	Issue introduced in 6.13 with commit b692bf9a7543af7ad11a59d182a3757578f0ba53 and fixed in 6.18.17 with commit 645c6d8376ad4913cbffe0e0c2cca0c4febbe596
	Issue introduced in 6.13 with commit b692bf9a7543af7ad11a59d182a3757578f0ba53 and fixed in 6.19.7 with commit b38cbd4af5034635cff109e08788c63f956f3a69
	Issue introduced in 6.13 with commit b692bf9a7543af7ad11a59d182a3757578f0ba53 and fixed in 7.0-rc3 with commit 60abb0ac11dccd6b98fd9182bc5f85b621688861

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-2026-23326

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:
include/net/xdp_sock_drv.h
net/xdp/xsk.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/5172adf9efb8298a52f4dcdc3f98d4d9d1e06a6d
	https://git.kernel.org/stable/c/2a9ea988465ece5b6896b1bdc144170a64e84c35
	https://git.kernel.org/stable/c/645c6d8376ad4913cbffe0e0c2cca0c4febbe596
	https://git.kernel.org/stable/c/b38cbd4af5034635cff109e08788c63f956f3a69
	https://git.kernel.org/stable/c/60abb0ac11dccd6b98fd9182bc5f85b621688861