Loading
netfilter: nft_set_pipapo: walk over current view on netlink dump
mainline inclusion from mainline-v6.9-rc5 commit 29b359cf6d95fd60730533f7f10464e95bd17c73 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9L5O8 CVE: CVE-2024-27017 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=29b359cf6d95fd60730533f7f10464e95bd17c73 -------------------------------- The generation mask can be updated while netlink dump is in progress. The pipapo set backend walk iterator cannot rely on it to infer what view of the datastructure is to be used. Add notation to specify if user wants to read/update the set. Based on patch from Florian Westphal. Fixes: 2b84e215 ("netfilter: nft_set_pipapo: .walk does not deal with generations") Signed-off-by:Pablo Neira Ayuso <pablo@netfilter.org> Conflicts: include/net/netfilter/nf_tables.h net/netfilter/nf_tables_api.c net/netfilter/nft_set_pipapo.c [e6ba7cb6 ("netfilter: nftables: add helper function to flush set elements") is not applied, so there is no nft_set_flush() function. Adaptation was made in nf_tables_delsetelem(). Other adaptations are context conflicts.] Signed-off-by:
Wang Hai <wanghai38@huawei.com>