Skip to contentSkip to conversation

CVE-2026-43026: netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 1

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: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent

ctnetlink_alloc_expect() allocates expectations from a non-zeroing slab cache via nf_ct_expect_alloc(). When CTA_EXPECT_NAT is not present in the netlink message, saved_addr and saved_proto are never initialized. Stale data from a previous slab occupant can then be dumped to userspace by ctnetlink_exp_dump_expect(), which checks these fields to decide whether to emit CTA_EXPECT_NAT.

The safe sibling nf_ct_expect_init(), used by the packet path, explicitly zeroes these fields.

Zero saved_addr, saved_proto and dir in the else branch, guarded by IS_ENABLED(CONFIG_NF_NAT) since these fields only exist when NAT is enabled.

Confirmed by priming the expect slab with NAT-bearing expectations, freeing them, creating a new expectation without CTA_EXPECT_NAT, and observing that the ctnetlink dump emits a spurious CTA_EXPECT_NAT containing stale data from the prior allocation.

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

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

	Issue introduced in 3.4 with commit 076a0ca02644657b13e4af363f487ced2942e9cb and fixed in 5.10.253 with commit a5a89db6981a1ddf2314bf50cb49db5a3146185f
	Issue introduced in 3.4 with commit 076a0ca02644657b13e4af363f487ced2942e9cb and fixed in 5.15.203 with commit 1c2ebdeff8d088a2e47ae25d7b38447249adace2
	Issue introduced in 3.4 with commit 076a0ca02644657b13e4af363f487ced2942e9cb and fixed in 6.1.168 with commit a64b7bf84b4d5ea54218c5d374ec87fff9000f43
	Issue introduced in 3.4 with commit 076a0ca02644657b13e4af363f487ced2942e9cb and fixed in 6.6.134 with commit 2898080c054ea4d6ddfaaf21bbedbc229a9a8376
	Issue introduced in 3.4 with commit 076a0ca02644657b13e4af363f487ced2942e9cb and fixed in 6.12.81 with commit fd002ff2ea030cbfb0188a11b3c60ce7f84485f4
	Issue introduced in 3.4 with commit 076a0ca02644657b13e4af363f487ced2942e9cb and fixed in 6.18.22 with commit 929f7a9a7aad9404a5867216c3f8738232355b38
	Issue introduced in 3.4 with commit 076a0ca02644657b13e4af363f487ced2942e9cb and fixed in 6.19.12 with commit bff0f4f06f12d6d9bc565a3e1378abd4f6f5ce36
	Issue introduced in 3.4 with commit 076a0ca02644657b13e4af363f487ced2942e9cb and fixed in 7.0 with commit 35177c6877134a21315f37d57a5577846225623e

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

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/nf_conntrack_netlink.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/a5a89db6981a1ddf2314bf50cb49db5a3146185f
	https://git.kernel.org/stable/c/1c2ebdeff8d088a2e47ae25d7b38447249adace2
	https://git.kernel.org/stable/c/a64b7bf84b4d5ea54218c5d374ec87fff9000f43
	https://git.kernel.org/stable/c/2898080c054ea4d6ddfaaf21bbedbc229a9a8376
	https://git.kernel.org/stable/c/fd002ff2ea030cbfb0188a11b3c60ce7f84485f4
	https://git.kernel.org/stable/c/929f7a9a7aad9404a5867216c3f8738232355b38
	https://git.kernel.org/stable/c/bff0f4f06f12d6d9bc565a3e1378abd4f6f5ce36
	https://git.kernel.org/stable/c/35177c6877134a21315f37d57a5577846225623e