Skip to content

Commit 7caa56f

Browse files
Florian Westphalummakynes
authored andcommitted
netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON
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: 81e675c ("netfilter: ebtables: add CONFIG_COMPAT support") Reported-by: [email protected] Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 5bdac41 commit 7caa56f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/bridge/netfilter/ebtables.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2032,7 +2032,8 @@ static int ebt_size_mwt(struct compat_ebt_entry_mwt *match32,
20322032
if (match_kern)
20332033
match_kern->match_size = ret;
20342034

2035-
if (WARN_ON(type == EBT_COMPAT_TARGET && size_left))
2035+
/* rule should have no remaining data after target */
2036+
if (type == EBT_COMPAT_TARGET && size_left)
20362037
return -EINVAL;
20372038

20382039
match32 = (struct compat_ebt_entry_mwt *) buf;

0 commit comments

Comments
 (0)