projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
558724a
)
netfilter: nfnetlink_acct: return -EINVAL if object name is empty
author
Pablo Neira Ayuso
<pablo@netfilter.org>
Sat, 23 Mar 2013 15:57:59 +0000
(16:57 +0100)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Mon, 25 Mar 2013 13:21:30 +0000
(14:21 +0100)
If user-space tries to create accounting object with an empty
name, then return -EINVAL.
Reported-by: Michael Zintakis <michael.zintakis@googlemail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink_acct.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nfnetlink_acct.c
b/net/netfilter/nfnetlink_acct.c
index
589d686
..
dc3fd5d
100644
(file)
--- a/
net/netfilter/nfnetlink_acct.c
+++ b/
net/netfilter/nfnetlink_acct.c
@@
-49,6
+49,8
@@
nfnl_acct_new(struct sock *nfnl, struct sk_buff *skb,
return -EINVAL;
acct_name = nla_data(tb[NFACCT_NAME]);
+ if (strlen(acct_name) == 0)
+ return -EINVAL;
list_for_each_entry(nfacct, &nfnl_acct_list, head) {
if (strncmp(nfacct->name, acct_name, NFACCT_NAME_MAX) != 0)