OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa412ba
)
netfilter: x_tables: assert minimum target size
author
Florian Westphal
<fw@strlen.de>
Fri, 1 Apr 2016 12:17:25 +0000
(14:17 +0200)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Wed, 13 Apr 2016 22:30:36 +0000
(
00:30
+0200)
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>
net/netfilter/x_tables.c
patch
|
blob
|
history
diff --git
a/net/netfilter/x_tables.c
b/net/netfilter/x_tables.c
index
1f44bfa
..
ec1b718
100644
(file)
--- a/
net/netfilter/x_tables.c
+++ b/
net/netfilter/x_tables.c
@@
-568,6
+568,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;