Skip to content
Commit cffee0b5 authored by Florian Westphal's avatar Florian Westphal Committed by Greg Kroah-Hartman
Browse files

netfilter: nft_payload: rebuild vlan header on h_proto access

[ Upstream commit af84f9e4 ]

nft can perform merging of adjacent payload requests.
This means that:

ether saddr 00:11 ... ether type 8021ad ...

is a single payload expression, for 8 bytes, starting at the
ethernet source offset.

Check that offset+length is fully within the source/destination mac
addersses.

This bug prevents 'ether type' from matching the correct h_proto in case
vlan tag got stripped.

Fixes: de6843be

 ("netfilter: nft_payload: rebuild vlan header when needed")
Reported-by: default avatarDavid Ward <david.ward@ll.mit.edu>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Stable-dep-of: 33c563eb

 ("netfilter: nft_payload: skbuff vlan metadata mangle support")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 96f261d5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment