projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c6b412
)
netfilter: nft_set_bitmap: initialize set element extension in lookups
author
Pablo Neira Ayuso
<pablo@netfilter.org>
Fri, 27 Mar 2020 16:43:04 +0000
(17:43 +0100)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Mon, 30 Mar 2020 00:05:37 +0000
(
02:05
+0200)
Otherwise, nft_lookup might dereference an uninitialized pointer to the
element extension.
Fixes: 665153ff5752 ("netfilter: nf_tables: add bitmap set type")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_set_bitmap.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nft_set_bitmap.c
b/net/netfilter/nft_set_bitmap.c
index 1cb2e67e6e035450605d1be224f85d407fde7faf..6829a497b4ccb1a45d877dbb0f78b3d4ad900280 100644
(file)
--- a/
net/netfilter/nft_set_bitmap.c
+++ b/
net/netfilter/nft_set_bitmap.c
@@
-81,6
+81,7
@@
static bool nft_bitmap_lookup(const struct net *net, const struct nft_set *set,
u32 idx, off;
nft_bitmap_location(set, key, &idx, &off);
+ *ext = NULL;
return nft_bitmap_active(priv->bitmap, idx, off, genmask);
}