netfilter: nft_nat: fully initialise new_addr in netmap setup
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3ff7ddb1353da9b535e65702704cbadea1da9a00 · < 0ce42c7b84032335abff9eac43762e4ca8224451| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
An IPv4 netmap operation in the Linux kernel's nft_nat component can pass uninitialized address bytes to nf_nat_setup_info(). The IPv6 path is not affected. The input does not specify attacker capabilities, authentication requirements, or user interaction.
Engineers running Linux kernels with nft_nat should check their versions against the vendor advisory; affected versions are not specified.