Commit c47ec2b1 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by Florian Westphal

netfilter: nf_log: validate nf_logger_find_get()

Sanitize nf_logger_find_get() input parameters, no caller in the tree
passes invalid values.
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
parent 79578be4
......@@ -156,6 +156,11 @@ int nf_logger_find_get(int pf, enum nf_log_type type)
struct nf_logger *logger;
int ret = -ENOENT;
if (pf >= ARRAY_SIZE(loggers))
return -EINVAL;
if (type >= NF_LOG_TYPE_MAX)
return -EINVAL;
if (pf == NFPROTO_INET) {
ret = nf_logger_find_get(NFPROTO_IPV4, type);
if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment