netfilter: x_tables: assert minimum target size
[ Upstream commit a08e4e190b
]
The target size includes the size of the xt_entry_target struct.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
wifi-calibration
parent
801cd32774
commit
aae91919c9
|
@ -570,6 +570,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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue