openvswitch: use after free in __ovs_ct_free_action()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 2 Apr 2019 06:53:14 +0000 (09:53 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Apr 2019 17:56:21 +0000 (10:56 -0700)
commit6d670497e01803b486aa72cc1a718401ab986896
treeb6c04cf9dbf218980ee7c25b16dd0449e817e77c
parentf0dfecc93a60d6ac2acae886103ee0449a25a9c9
openvswitch: use after free in __ovs_ct_free_action()

We free "ct_info->ct" and then use it on the next line when we pass it
to nf_ct_destroy_timeout().  This patch swaps the order to avoid the use
after free.

Fixes: 06bd2bdf19d2 ("openvswitch: Add timeout support to ct action")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/conntrack.c