]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nft_payload: fix wrong mac header matching
authorFlorian Westphal <fw@strlen.de>
Sun, 8 Oct 2023 17:36:53 +0000 (19:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 09:58:56 +0000 (11:58 +0200)
commit04e0eef74b8f83a5cf60755759e70f3b982d6c19
treea4b41860fec312979219078d9987a61b4bccc26b
parentefe43d1bcbcb9fe48e541dd6e2b9bef8d85261e6
netfilter: nft_payload: fix wrong mac header matching

commit d351c1ea2de3e36e608fc355d8ae7d0cc80e6cd6 upstream.

mcast packets get looped back to the local machine.
Such packets have a 0-length mac header, we should treat
this like "mac header not set" and abort rule evaluation.

As-is, we just copy data from the network header instead.

Fixes: 96518518cc41 ("netfilter: add nftables")
Reported-by: Blažej Krajňák <krajnak@levonet.sk>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_payload.c