From: Pablo Neira Ayuso Date: Fri, 27 Mar 2020 16:43:04 +0000 (+0100) Subject: netfilter: nft_set_bitmap: initialize set element extension in lookups X-Git-Tag: Ubuntu-5.10.0-12.13~3211^2~12^2~6 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=24791b9aa1ab09818617ff384876930e09ada0a3;p=mirror_ubuntu-hirsute-kernel.git netfilter: nft_set_bitmap: initialize set element extension in lookups 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 --- diff --git a/net/netfilter/nft_set_bitmap.c b/net/netfilter/nft_set_bitmap.c index 1cb2e67e6e03..6829a497b4cc 100644 --- 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); }