Commit 6b9f8b74 authored by Florian Westphal's avatar Florian Westphal Committed by Willy Tarreau

netfilter: x_tables: assert minimum target size

commit a08e4e19 upstream.

The target size includes the size of the xt_entry_target struct.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent ea878a44
......@@ -587,6 +587,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment