mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 16:44:27 +08:00
netfilter: nft_set_bitmap: initialize set element extension in lookups
Otherwise, nft_lookup might dereference an uninitialized pointer to the
element extension.
Fixes: 665153ff57
("netfilter: nf_tables: add bitmap set type")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
7c6b412162
commit
24791b9aa1
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user