projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32fc718
)
netfilter: nf_tables: missing attribute validation in nf_tables_delflowtable()
author
Pablo Neira Ayuso
<pablo@netfilter.org>
Mon, 26 Feb 2018 12:16:05 +0000
(13:16 +0100)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Tue, 27 Feb 2018 07:06:57 +0000
(08:06 +0100)
Return -EINVAL is mandatory attributes are missing.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nf_tables_api.c
b/net/netfilter/nf_tables_api.c
index
43acdee
..
2b5aa78
100644
(file)
--- a/
net/netfilter/nf_tables_api.c
+++ b/
net/netfilter/nf_tables_api.c
@@
-5161,6
+5161,11
@@
static int nf_tables_delflowtable(struct net *net, struct sock *nlsk,
struct nft_table *table;
struct nft_ctx ctx;
+ if (!nla[NFTA_FLOWTABLE_TABLE] ||
+ (!nla[NFTA_FLOWTABLE_NAME] &&
+ !nla[NFTA_FLOWTABLE_HANDLE]))
+ return -EINVAL;
+
table = nf_tables_table_lookup(net, nla[NFTA_FLOWTABLE_TABLE],
family, genmask);
if (IS_ERR(table))