CVE-2026-143263: netfilter: nat: zero newrange before filling it in

Published Dec 3, 2026
·
Updated

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

netfilter: nat: zero newrange before filling it in

nfnatmasqueradeipv4(), nfnatmasqueradeipv6(), netmaptg4() and netmaptg6() each build a stack-local struct nfnatrange2 from the caller-supplied range, inheriting range->flags unmodified. Two of them only memset() the minaddr/maxaddr members, the other two don't memset() anything at all, so newrange.baseproto is left as stack garbage.

If the inherited flags include NFNATRANGEPROTOOFFSET, nfnatl4protouniquetuple() reads range->baseproto.all to compute the NAT port offset. Neither the NETMAP nor the MASQUERADE targets mask the flags field in their checkentry callback, so this uninitialized stack value can end up feeding the NAT port selection.

The per-member memset()s are not enough: they have to enumerate every field that must be cleared, and baseproto was missed when NFNATRANGEPROTOOFFSET/baseproto was added to the struct. memset() the whole struct instead, so every member is covered regardless of which ones get explicitly assigned afterwards.

There are other places that miss this, but those hardcode .flags so nat core won't read from the uninitialized fields.

C99 initializers would be preferrable, but this is a more intrusive change. Lets followup in nf-next and convert others as well.

This is an LLM finding.

Affected Software

6 affected componentsFixes available
Linux Linux kernel
linux/kernel>=4.18.0<5.10.276
5.10.276
linux/kernel>=5.11.0<5.15.227
5.15.227
linux/kernel>=5.16.0<6.12.120
6.12.120
linux/kernel>=6.13.0<6.18.66
6.18.66
linux/kernel>=6.19.0<7.3.7
7.3.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.10.276
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.15.227
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.120
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.66
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.7
  6. Compensating control

    Zero the entire stack-local newrange struct before filling it in, rather than clearing only selected members.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:21 AM
Data Sourced
via MITRE·09:21 AM
Description
Data Sourced
via OSV·09:21 AM
DescriptionAffected Software
Data Sourced
via NVD·10:18 AM
Description

Frequently Asked Questions

1

Which NAT configurations can reach the uninitialized value?

The affected paths are the IPv4 and IPv6 MASQUERADE and NETMAP targets when the inherited range flags include NF_NAT_RANGE_PROTO_OFFSET. Their checkentry callbacks do not mask that flag.

2

What is the practical effect when the condition is met?

NAT port selection can consume the uninitialized base_proto value from a stack-local nf_nat_range2 structure when computing the port offset. This can cause NAT behavior to depend on stack garbage rather than an initialized protocol range value.

3

What should be done if this is identified in a deployed kernel?

Apply a kernel update containing the referenced stable fixes. The fix zeroes the complete nf_nat_range2 structure before explicitly filling its fields, ensuring base_proto cannot retain uninitialized stack data.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203