Skip to contentSkip to conversation

CVE-2026-31684: net: sched: act_csum: validate nested VLAN headers

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Apr 25

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

net: sched: act_csum: validate nested VLAN headers

tcf_csum_act() walks nested VLAN headers directly from skb->data when an skb still carries in-payload VLAN tags. The current code reads vlan->h_vlan_encapsulated_proto and then pulls VLAN_HLEN bytes without first ensuring that the full VLAN header is present in the linear area.

If only part of an inner VLAN header is linearized, accessing h_vlan_encapsulated_proto reads past the linear area, and the following skb_pull(VLAN_HLEN) may violate skb invariants.

Fix this by requiring pskb_may_pull(skb, VLAN_HLEN) before accessing and pulling each nested VLAN header. If the header still is not fully available, drop the packet through the existing error path.

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

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

	Issue introduced in 5.1 with commit 2ecba2d1e45b24620a7c3df9531895cf68d5dec6 and fixed in 6.12.83 with commit a69738efea0996d05a3c7d2178551b891744df1b
	Issue introduced in 5.1 with commit 2ecba2d1e45b24620a7c3df9531895cf68d5dec6 and fixed in 6.18.24 with commit ec4930979b3f7bbeb7af5744599fc6603a4dba62
	Issue introduced in 5.1 with commit 2ecba2d1e45b24620a7c3df9531895cf68d5dec6 and fixed in 6.19.14 with commit 3d165d975305cf76ff0b10a3c798fb31e5f5f9a5
	Issue introduced in 5.1 with commit 2ecba2d1e45b24620a7c3df9531895cf68d5dec6 and fixed in 7.0 with commit c842743d073bdd683606cb414eb0ca84465dd834
	Issue introduced in 4.19.99 with commit 3764bfae5056e95617b6ee074129297e11710886

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

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/sched/act_csum.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/a69738efea0996d05a3c7d2178551b891744df1b
	https://git.kernel.org/stable/c/ec4930979b3f7bbeb7af5744599fc6603a4dba62
	https://git.kernel.org/stable/c/3d165d975305cf76ff0b10a3c798fb31e5f5f9a5
	https://git.kernel.org/stable/c/c842743d073bdd683606cb414eb0ca84465dd834