提交 6d670497 编写于 作者: D Dan Carpenter 提交者: David S. Miller

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: 06bd2bdf ("openvswitch: Add timeout support to ct action")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NYi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f0dfecc9
......@@ -1804,9 +1804,9 @@ static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info)
if (ct_info->helper)
nf_conntrack_helper_put(ct_info->helper);
if (ct_info->ct) {
nf_ct_tmpl_free(ct_info->ct);
if (ct_info->timeout[0])
nf_ct_destroy_timeout(ct_info->ct);
nf_ct_tmpl_free(ct_info->ct);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册