mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON
commit7caa56f006upstream. It means userspace gave us a ruleset where there is some other data after the ebtables target but before the beginning of the next rule. Fixes:81e675c227("netfilter: ebtables: add CONFIG_COMPAT support") Reported-by: syzbot+659574e7bcc7f7eb4df7@syzkaller.appspotmail.com Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ba4837023e
commit
a8946d9cbd
@@ -2030,7 +2030,8 @@ static int ebt_size_mwt(struct compat_ebt_entry_mwt *match32,
|
||||
if (match_kern)
|
||||
match_kern->match_size = ret;
|
||||
|
||||
if (WARN_ON(type == EBT_COMPAT_TARGET && size_left))
|
||||
/* rule should have no remaining data after target */
|
||||
if (type == EBT_COMPAT_TARGET && size_left)
|
||||
return -EINVAL;
|
||||
|
||||
match32 = (struct compat_ebt_entry_mwt *) buf;
|
||||
|
||||
Reference in New Issue
Block a user