Commit 24791b9a authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nft_set_bitmap: initialize set element extension in lookups



Otherwise, nft_lookup might dereference an uninitialized pointer to the
element extension.

Fixes: 665153ff ("netfilter: nf_tables: add bitmap set type")
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 7c6b4121
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
}