diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-03-23 16:57:59 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-03-25 14:21:30 +0100 |
commit | deadcfc3324410726cd6a663fb4fc46be595abe7 (patch) | |
tree | 95d308b78abc27e3e0608257bfaa9d5e9ea359f0 /net | |
parent | 558724a5b2a73ad0c7638e21e8dffc419d267b6c (diff) | |
download | op-kernel-dev-deadcfc3324410726cd6a663fb4fc46be595abe7.zip op-kernel-dev-deadcfc3324410726cd6a663fb4fc46be595abe7.tar.gz |
netfilter: nfnetlink_acct: return -EINVAL if object name is empty
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nfnetlink_acct.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c index 589d686..dc3fd5d 100644 --- 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) |