projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea878a4
)
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
Willy Tarreau
<w@1wt.eu>
Sun, 21 Aug 2016 21:22:28 +0000
(23:22 +0200)
commit
a08e4e190b866579896c09af59b3bdca821da2cd
upstream.
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: Willy Tarreau <w@1wt.eu>
net/netfilter/x_tables.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netfilter/x_tables.c
b/net/netfilter/x_tables.c
index 55b1e0ccb0e29e6977996c0b7ca4af729250f6d0..cc34bb38c81492c373658ac8352a021e080de0f5 100644
(file)
--- a/
net/netfilter/x_tables.c
+++ b/
net/netfilter/x_tables.c
@@
-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;