Skip to contentSkip to conversation

CVE-2021-47293: net/sched: act_skbmod: Skip non-Ethernet packets

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 21, 2024

lore
Share & tools
lore
#0 lore raw

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

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

net/sched: act_skbmod: Skip non-Ethernet packets

Currently tcf_skbmod_act() assumes that packets use Ethernet as their L2 protocol, which is not always the case. As an example, for CAN devices:

	$ ip link add dev vcan0 type vcan
	$ ip link set up vcan0
	$ tc qdisc add dev vcan0 root handle 1: htb
	$ tc filter add dev vcan0 parent 1: protocol ip prio 10 \
		matchall action skbmod swap mac

Doing the above silently corrupts all the packets. Do not perform skbmod actions for non-Ethernet packets.

The Linux kernel CVE team has assigned CVE-2021-47293 to this issue.

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

	Issue introduced in 4.9 with commit 86da71b57383 and fixed in 4.19.199 with commit e4fdca366806
	Issue introduced in 4.9 with commit 86da71b57383 and fixed in 5.4.136 with commit a88414fb1117
	Issue introduced in 4.9 with commit 86da71b57383 and fixed in 5.10.54 with commit 071729150be9
	Issue introduced in 4.9 with commit 86da71b57383 and fixed in 5.13.6 with commit 34f1e1f657fa
	Issue introduced in 4.9 with commit 86da71b57383 and fixed in 5.14 with commit 727d6a8b7ef3

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-2021-47293

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_skbmod.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/e4fdca366806f6bab374d1a95e626a10a3854b0c
	https://git.kernel.org/stable/c/a88414fb1117f2fe65fb88e45ba694e1d09d5024
	https://git.kernel.org/stable/c/071729150be9e1d1b851b70efb6d91ee9269d57b
	https://git.kernel.org/stable/c/34f1e1f657fae2891b485a3b2b95fe4d2aef9f0d
	https://git.kernel.org/stable/c/727d6a8b7ef3d25080fad228b2c4a1d4da5999c6