netfilter: nft_ct: fix use after free when attaching zone template
[ Upstream commit 34243b9e ] The conversion erroneously removed the refcount increment. In case we can use the percpu template, we need to increment the refcount, else it will be released when the skb gets freed. In case the slowpath is taken, the new template already has a refcount of 1. Fixes: 71977437 ("netfilter: conntrack: convert to refcount_t api") Reported-by:kernel test robot <oliver.sang@intel.com> Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org> Stable-dep-of: 5cfe5612 ("netfilter: nft_ct: Use __refcount_inc() for per-CPU nft_ct_pcpu_template.") Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading