Skip to contentSkip to conversation

CVE-2026-53212: netfilter: nft_tunnel: fix use-after-free on object destroy

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jun 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:

netfilter: nft_tunnel: fix use-after-free on object destroy

nft_tunnel_obj_destroy() calls metadata_dst_free() which directly kfree()s the metadata_dst, ignoring the dst_entry refcount. Packets that took a reference via dst_hold() in nft_tunnel_obj_eval() and are still queued (e.g. in a netem qdisc) are left with a dangling pointer. When these packets are eventually dequeued, dst_release() operates on freed memory.

Replace metadata_dst_free() with dst_release() so the metadata_dst is freed only after all references are dropped. The dst subsystem already handles metadata_dst cleanup in dst_destroy() when DST_METADATA is set.

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

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

	Issue introduced in 4.19 with commit af308b94a2a4a5a27bec9028354c4df444a7c8ba and fixed in 5.10.259 with commit 349df61526d2e39decc685d246202e3e284cfe05
	Issue introduced in 4.19 with commit af308b94a2a4a5a27bec9028354c4df444a7c8ba and fixed in 5.15.210 with commit 55b79b1ae42372012413ce0413181d26679b17ef
	Issue introduced in 4.19 with commit af308b94a2a4a5a27bec9028354c4df444a7c8ba and fixed in 6.1.176 with commit 5e9ee18b27fde88cb6148202b33916c66693fe82
	Issue introduced in 4.19 with commit af308b94a2a4a5a27bec9028354c4df444a7c8ba and fixed in 6.6.143 with commit 8767fe4079affa74314d7eb3220e700150289842
	Issue introduced in 4.19 with commit af308b94a2a4a5a27bec9028354c4df444a7c8ba and fixed in 6.12.94 with commit fda6573a46ad24f35348e024905ee5bdf729797e
	Issue introduced in 4.19 with commit af308b94a2a4a5a27bec9028354c4df444a7c8ba and fixed in 6.18.36 with commit 941d7394efda5e054e2d6f3e0dd0f6a9ba19aaa3
	Issue introduced in 4.19 with commit af308b94a2a4a5a27bec9028354c4df444a7c8ba and fixed in 7.0.13 with commit f9a0e4b61054cde89a2a77845293c726cc07cc43
	Issue introduced in 4.19 with commit af308b94a2a4a5a27bec9028354c4df444a7c8ba and fixed in 7.1 with commit c32b26aaa2f9216520a38b3f4bfeec846eb3eb8a

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

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:
net/netfilter/nft_tunnel.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/349df61526d2e39decc685d246202e3e284cfe05
	https://git.kernel.org/stable/c/55b79b1ae42372012413ce0413181d26679b17ef
	https://git.kernel.org/stable/c/5e9ee18b27fde88cb6148202b33916c66693fe82
	https://git.kernel.org/stable/c/8767fe4079affa74314d7eb3220e700150289842
	https://git.kernel.org/stable/c/fda6573a46ad24f35348e024905ee5bdf729797e
	https://git.kernel.org/stable/c/941d7394efda5e054e2d6f3e0dd0f6a9ba19aaa3
	https://git.kernel.org/stable/c/f9a0e4b61054cde89a2a77845293c726cc07cc43
	https://git.kernel.org/stable/c/c32b26aaa2f9216520a38b3f4bfeec846eb3eb8a