Florian Westphal 2e25c46c6e netfilter: nft_ct: fix use after free when attaching zone template
commit 34243b9ec856309339172b1507379074156947e8 upstream.

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: 719774377622 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-27 14:39:01 +02:00
..
2022-03-11 12:22:36 +01:00
2022-04-20 09:34:22 +02:00
2021-06-30 15:51:09 -07:00
2021-06-29 11:28:21 -07:00
2022-04-08 14:24:14 +02:00
2022-04-08 14:23:36 +02:00
2021-07-29 15:06:49 +01:00
2021-07-29 15:06:49 +01:00