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.
Published: 2026-06-25
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is a use-after-free condition in the Linux kernel’s netfilter nft_tunnel code. During object destruction, the code calls metadata_dst_free() which directly frees a destination metadata structure without accounting for reference counts held by packets. Packets that have a reference via dst_hold() and are queued in interfaces such as a netem qdisc end up referencing freed memory. When those packets are later dequeued, dst_release() operates on this invalid pointer, potentially corrupting kernel memory. This flaw is categorized as CWE‑416 and can enable an attacker who can trigger the deallocation path to perform arbitrary code execution or cause a kernel panic, resulting in denial of service.

Affected Systems

All Linux kernel builds that contain the vulnerable nft_tunnel implementation are impacted. No specific release numbers are listed, but the issue exists in any kernel prior to the commit that replaces metadata_dst_free() with dst_release(). Users should verify whether their installed kernel contains the fix from the referenced git patches.

Risk and Exploitability

CWE‑416 vulnerabilities in the kernel are considered high severity. Although no EPSS score is currently available and the flaw is not listed in the CISA KEV catalog, the potential for memory corruption and the kernel context imply a high likelihood of serious impact. In the absence of public exploitation evidence, the risk remains primarily theoretical, but proactive remediation is advised to prevent possible exploitation by malicious actors.

Generated by OpenCVE AI on June 25, 2026 at 11:25 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that incorporates the commit replacing metadata_dst_free() with dst_release(); the latest stable kernels include this fix.
  • If an immediate kernel upgrade is not feasible, download and apply the patch manually from the commit history—specifically apply the change shown at https://git.kernel.org/stable/c/349df61526d2e39decc685d246202e3e284cfe05 to the kernel source tree and rebuild the kernel.
  • After updating or patching, recompile and load the kernel, then verify that nft_tunnel and any related netem configuration no longer trigger use-after-free paths; monitor kernel logs for tainted or memory-related messages to ensure stability.

Generated by OpenCVE AI on June 25, 2026 at 11:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 25 Jun 2026 11:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Thu, 25 Jun 2026 09:15:00 +0000

Type Values Removed Values Added
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.
Title netfilter: nft_tunnel: fix use-after-free on object destroy
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-06-25T08:39:16.888Z

Reserved: 2026-06-09T07:44:35.391Z

Link: CVE-2026-53212

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-25T11:30:06Z

Weaknesses