netfilter: ebtables: fix erroneous reject of last rule
authorFlorian Westphal <fw@strlen.de>
Thu, 8 Mar 2018 11:54:19 +0000 (12:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:50:36 +0000 (07:50 +0200)
commitcb5ce10a27d5a55c50072dfdeb12c9b62d140563
tree7bdf8ef6fdfab1413908955d1755d4839d35e3c6
parent3bdcced41936b054470639c6a76ae033df1074e3
netfilter: ebtables: fix erroneous reject of last rule

[ Upstream commit 932909d9b28d27e807ff8eecb68c7748f6701628 ]

The last rule in the blob has next_entry offset that is same as total size.
This made "ebtables32 -A OUTPUT -d de:ad:be:ef:01:02" fail on 64 bit kernel.

Fixes: b71812168571fa ("netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bridge/netfilter/ebtables.c