CVE-2026-98322 in Linuxinfo

Summary

by MITRE • 10/06/2026

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

netfilter: nft_nat: fully initialise new_addr in netmap setup

nft_nat_setup_netmap() builds the mapped address in an on-stack union nf_inet_addr. For an IPv4 mapping it writes only the 4-byte .ip member and the loop runs a single 32-bit iteration, but it then copies the whole 16-byte union into range->min_addr and range->max_addr, so the upper 12 bytes reach nf_nat_setup_info() uninitialised.

KMSAN reports an uninit-value in nf_nat_setup_info() reached from nft_nat_eval(). The IPv6 path fills all 16 bytes and is not affected.

Zero-initialise new_addr.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 10/06/2026

The Linux kernel vulnerability identified within the netfilter subsystem, specifically affecting the nft_nat module, represents a critical memory safety flaw rooted in improper initialization of stack-allocated data structures during network address translation operations. The core technical issue resides in the function nft_nat_setup_netmap(), which is responsible for constructing mapped IP addresses using an on-stack union type named nf_inet_addr. This union structure is designed to accommodate both IPv4 and IPv6 addresses, with a total size of sixteen bytes to support the larger IPv6 address space while also containing a four-byte member specifically designated for IPv4 addressing. The vulnerability emerges when the system processes an IPv4 mapping scenario. In this specific code path, the implementation correctly writes only the first four bytes corresponding to the .ip member of the union with the mapped IPv4 address value. However, the subsequent logic proceeds to copy the entire sixteen-byte union into the range->min_addr and range->max_addr fields without ensuring that the remaining twelve bytes are explicitly initialized or zeroed out.

This incomplete initialization leads directly to a state where uninitialised memory contents from previous stack usage remain embedded within the address structure passed downstream to nf_nat_setup_info(). The kernel Memory Sanitizer, known as KMSAN, has flagged this behavior by detecting an uninit-value error originating in nf_nat_setup_info() and traced back through nft_nat_eval(). Because the upper twelve bytes of the union are not cleared before being copied into the NAT range structures, these fields contain garbage data from prior stack operations. This constitutes a classic case of information exposure or potential logic bypass depending on how the downstream functions interpret this uninitialized memory. While the IPv6 code path is unaffected because it explicitly fills all sixteen bytes of the structure during its mapping process, the asymmetry in handling between IPv4 and IPv6 paths creates an exploitable inconsistency that compromises the integrity of network packet processing within the kernel space.

The operational impact of this vulnerability extends beyond mere data leakage. In a production environment, uninitialised memory values can lead to unpredictable behavior in connection tracking and NAT table management. Attackers who can influence or observe network traffic patterns might potentially leverage these uninitialized bytes to manipulate routing decisions, cause denial-of-service conditions through kernel panics triggered by invalid address ranges, or even exfiltrate sensitive stack data that could reveal cryptographic keys or other privileged information from previous system operations. The presence of such flaws in the netfilter subsystem is particularly concerning given its central role in packet filtering and network address translation for most Linux-based systems, including cloud infrastructure and enterprise firewalls.

From a classification perspective, this vulnerability aligns with CWE-457, which describes the use of an uninitialized variable, as well as CWE-908, involving the use of uninitialised resource. In terms of adversarial tactics, while not directly mapping to a specific ATT&CK technique in isolation, it facilitates potential lateral movement or privilege escalation if combined with other vulnerabilities that allow for arbitrary code execution based on crafted network packets. The remediation strategy implemented by the kernel maintainers involves zero-initialising the new_addr union before any partial writes occur. This ensures that regardless of whether an IPv4 or IPv6 mapping is performed, the entire sixteen-byte structure contains deterministic data, thereby eliminating the risk of leaking stack garbage into critical NAT range structures. System administrators should ensure their kernels are updated to include this patch and monitor for any anomalous kernel logs related to memory sanitization errors in network processing paths.

Responsible

Linux

Reservation

09/25/2026

Disclosure

10/06/2026

Moderation

accepted

EPSS

0.00220

KEV

no

Activities

low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!