netfilter: nf_conntrack: use RCU safe kfree for conntrack extensions
authorMichal Kubecek <mkubecek@suse.cz>
Wed, 11 Sep 2013 08:17:27 +0000 (10:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 18:57:35 +0000 (10:57 -0800)
commit78ab8cbc11ee095ec27d7f6edde91e2c3af1540d
tree950a8a36850f05a2c0acbbbbe98438c7c323f5cf
parenta1daae5dbf42e8f4446c122a63a24fdb8b2c854b
netfilter: nf_conntrack: use RCU safe kfree for conntrack extensions

commit c13a84a830a208fb3443628773c8ca0557773cc7 upstream.

Commit 68b80f11 (netfilter: nf_nat: fix RCU races) introduced
RCU protection for freeing extension data when reallocation
moves them to a new location. We need the same protection when
freeing them in nf_ct_ext_free() in order to prevent a
use-after-free by other threads referencing a NAT extension data
via bysource list.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/netfilter/nf_conntrack_extend.h