Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions net/bridge/netfilter/ebtables.c
Original file line number Diff line number Diff line change
Expand Up @@ -2079,13 +2079,22 @@ static int size_entry_mwt(struct ebt_entry *entry, const unsigned char *base,
* offsets are relative to beginning of struct ebt_entry (i.e., 0).
*/
for (i = 0; i < 4 ; ++i) {
for (i = 0; i < 4 ; ++i) {
if (offsets[i] >= *total)
if (offsets[i] >= *total)
return -EINVAL;
return -EINVAL;
if (i == 0)
if (i == 0)
continue;
continue;
if (offsets[i-1] > offsets[i])
if (offsets[i-1] > offsets[i])
return -EINVAL;
return -EINVAL;
}
}


for (i = 0, j = 1 ; j < 4 ; j++, i++) {
struct compat_ebt_entry_mwt *match32;
Expand Down