No description
Find a file
Ignacy Gawędzki 685fc8d224 netfilter: fix regression in looped (broad|multi)cast's MAC handling
[ Upstream commit ebb966d3bd ]

In commit 5648b5e116 ("netfilter: nfnetlink_queue: fix OOB when mac
header was cleared"), the test for non-empty MAC header introduced in
commit 2c38de4c1f ("netfilter: fix looped (broad|multi)cast's MAC
handling") has been replaced with a test for a set MAC header.

This breaks the case when the MAC header has been reset (using
skb_reset_mac_header), as is the case with looped-back multicast
packets.  As a result, the packets ending up in NFQUEUE get a bogus
hwaddr interpreted from the first bytes of the IP header.

This patch adds a test for a non-empty MAC header in addition to the
test for a set MAC header.  The same two tests are also implemented in
nfnetlink_log.c, where the initial code of commit 2c38de4c1f
("netfilter: fix looped (broad|multi)cast's MAC handling") has not been
touched, but where supposedly the same situation may happen.

Fixes: 5648b5e116 ("netfilter: nfnetlink_queue: fix OOB when mac header was cleared")
Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-12-29 12:23:34 +01:00
arch arm64: dts: allwinner: orangepi-zero-plus: fix PHY mode 2021-12-29 12:23:34 +01:00
block
certs
crypto
Documentation
drivers IB/qib: Fix memory leak in qib_user_sdma_queue_pkts() 2021-12-29 12:23:34 +01:00
fs
include net: sched: Fix suspicious RCU usage while accessing tcf_tunnel_info 2021-12-22 09:29:40 +01:00
init
ipc
kernel rcu: Mark accesses to rcu_state.n_force_qs 2021-12-22 09:29:40 +01:00
lib
LICENSES
mm
net netfilter: fix regression in looped (broad|multi)cast's MAC handling 2021-12-29 12:23:34 +01:00
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.4.168 2021-12-22 09:29:41 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.