Message ID | 1466706893-16646-11-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 25188f8ff0d0..a87701d5827c 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -571,6 +571,9 @@ int xt_check_entry_offsets(const void *base, return -EINVAL; t = (void *)(e + target_offset); + if (t->u.target_size < sizeof(*t)) + return -EINVAL; + if (target_offset + t->u.target_size > next_offset) return -EINVAL;