projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
netfilter: nfnetlink_acct: validate NFACCT_FILTER parameters
[cascardo/linux.git]
/
net
/
netfilter
/
nfnetlink_acct.c
diff --git
a/net/netfilter/nfnetlink_acct.c
b/net/netfilter/nfnetlink_acct.c
index
5274b04
..
4c2b4c0
100644
(file)
--- a/
net/netfilter/nfnetlink_acct.c
+++ b/
net/netfilter/nfnetlink_acct.c
@@
-242,6
+242,9
@@
nfacct_filter_alloc(const struct nlattr * const attr)
if (err < 0)
return ERR_PTR(err);
+ if (!tb[NFACCT_FILTER_MASK] || !tb[NFACCT_FILTER_VALUE])
+ return ERR_PTR(-EINVAL);
+
filter = kzalloc(sizeof(struct nfacct_filter), GFP_KERNEL);
if (!filter)
return ERR_PTR(-ENOMEM);