[1/3] net/ixgbe: set pointer to NULL after free
Checks
Commit Message
When ixgbe_dev_close() is cleaning up, it does not correctly set
the security_ctx variable to NULL, which will lead to wild pointer.
Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
1 file changed, 1 insertion(+)
Comments
> -----Original Message-----
> From: Yunjian Wang <wangyunjian@huawei.com>
> Sent: Tuesday, February 15, 2022 18:25
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>; jiawenwu@trustnetic.com;
> jianwang@trustnetic.com; dingxiaoxiong@huawei.com; huangshaozhang@huawei.com; Yunjian Wang
> <wangyunjian@huawei.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 1/3] net/ixgbe: set pointer to NULL after free
>
> When ixgbe_dev_close() is cleaning up, it does not correctly set
> the security_ctx variable to NULL, which will lead to wild pointer.
>
> Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
> drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
> --
> 2.27.0
@@ -3038,6 +3038,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev)
#ifdef RTE_LIB_SECURITY
rte_free(dev->security_ctx);
+ dev->security_ctx = NULL;
#endif
return ret;