Skip to contentSkip to conversation

CVE-2026-80634: netfilter: flowtable: avoid num_encaps underflow on bridge VLAN untag

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 28

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: flowtable: avoid num_encaps underflow on bridge VLAN untag

The DEV_PATH_BR_VLAN_UNTAG case post-decrements info->num_encaps inside WARN_ON_ONCE(). num_encaps is u8, so if it's already 0 the decrement still happens and wraps it to 255. The break only leaves the inner switch -- a later path entry can set info->indev back to a real device, and we end up returning with num_encaps == 255.

nft_dev_forward_path() then walks info.encap[] (size 2) up to num_encaps, which means an OOB stack read and a bogus count copied into the route descriptor.

Should only happen on a malformed bridge path stack, hence the WARN, but worth handling sanely. Move the decrement out of the WARN.

[ While at this, remove the WARN_ON_ONCE since this can only happen
with a buggy bridge path stack --pablo ].

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

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

	Issue introduced in 5.13 with commit e990cef6516daa4e1e236433579e333f74fd38cb and fixed in 7.1.5 with commit 2f55fa28011c97d6495d5787808db10a8c2d690d
	Issue introduced in 5.13 with commit e990cef6516daa4e1e236433579e333f74fd38cb and fixed in 7.2 with commit e052f920773b73be49eb4d8702a9f85de7464363

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

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_flow_table_path.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/2f55fa28011c97d6495d5787808db10a8c2d690d
	https://git.kernel.org/stable/c/e052f920773b73be49eb4d8702a9f85de7464363