Skip to contentSkip to conversation

CVE-2026-98793: netfilter: bpf: reject invalid NAT manipulation types

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

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: bpf: reject invalid NAT manipulation types

As bpf_ct_set_nat_info() is not validating the NAT manipulation type a wrong value can be passed directly to nf_nat_setup_info(). This triggers the WARN_ON() at nf_nat_setup_info() and if panic_on_warn isn't set, then IPS_SRC_NAT_DONE is set without adding nat_bysource and conntrack cleanup tries to unlink an uninitialized hlist node.

Fix this by checking that NAT manipulation type is correct before calling nf_nat_setup_info(). In addition, if the WARN_ON is hit, return NF_DROP instead of continuing with the processing to avoid similar situations in the future.

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

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

	Issue introduced in 6.1 with commit 0fabd2aa199faeb8754aee94658f2c48ccb2c8c3 and fixed in 6.12.113 with commit ea777dc90ab37e64fa4b92f6fcf3b5edcef5e058
	Issue introduced in 6.1 with commit 0fabd2aa199faeb8754aee94658f2c48ccb2c8c3 and fixed in 6.18.56 with commit f6143ae109df56d51d5536e813deb19eee7a6205
	Issue introduced in 6.1 with commit 0fabd2aa199faeb8754aee94658f2c48ccb2c8c3 and fixed in 7.2.10 with commit 58108f05b0502448f6bb612ee2eccc63bd6449cb
	Issue introduced in 6.1 with commit 0fabd2aa199faeb8754aee94658f2c48ccb2c8c3 and fixed in 7.3-rc6 with commit 16d464013ec2267b00a83f4bfbb97b3ecc63bfa7

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

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_nat_bpf.c
net/netfilter/nf_nat_core.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/ea777dc90ab37e64fa4b92f6fcf3b5edcef5e058
	https://git.kernel.org/stable/c/f6143ae109df56d51d5536e813deb19eee7a6205
	https://git.kernel.org/stable/c/58108f05b0502448f6bb612ee2eccc63bd6449cb
	https://git.kernel.org/stable/c/16d464013ec2267b00a83f4bfbb97b3ecc63bfa7