* [dpdk-dev] [PATCH v2 1/3] net/ixgbe: set pointer to NULL after free
[not found] <cover.1644927269.git.wangyunjian@huawei.com>
@ 2022-02-15 13:01 ` Yunjian Wang
2022-02-15 13:02 ` [dpdk-dev] [PATCH v2 2/3] net/txgbe: " Yunjian Wang
2022-02-15 13:02 ` [dpdk-dev] [PATCH v2 3/3] net/iavf: " Yunjian Wang
2 siblings, 0 replies; 3+ messages in thread
From: Yunjian Wang @ 2022-02-15 13:01 UTC (permalink / raw)
To: dev
Cc: ferruh.yigit, jingjing.wu, beilei.xing, haiyue.wang, jiawenwu,
jianwang, dingxiaoxiong, huangshaozhang, Yunjian Wang, stable
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
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 3d799d2187..7643842560 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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;
--
2.27.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH v2 2/3] net/txgbe: set pointer to NULL after free
[not found] <cover.1644927269.git.wangyunjian@huawei.com>
2022-02-15 13:01 ` [dpdk-dev] [PATCH v2 1/3] net/ixgbe: set pointer to NULL after free Yunjian Wang
@ 2022-02-15 13:02 ` Yunjian Wang
2022-02-15 13:02 ` [dpdk-dev] [PATCH v2 3/3] net/iavf: " Yunjian Wang
2 siblings, 0 replies; 3+ messages in thread
From: Yunjian Wang @ 2022-02-15 13:02 UTC (permalink / raw)
To: dev
Cc: ferruh.yigit, jingjing.wu, beilei.xing, haiyue.wang, jiawenwu,
jianwang, dingxiaoxiong, huangshaozhang, Yunjian Wang, stable
When txgbe_dev_close() is cleaning up, it does not correctly set
the security_ctx variable to NULL, which will lead to wild pointer.
Fixes: f437d97c3df1 ("net/txgbe: add IPsec context creation")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 7b42285b9e..19d4444748 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2032,6 +2032,7 @@ txgbe_dev_close(struct rte_eth_dev *dev)
#ifdef RTE_LIB_SECURITY
rte_free(dev->security_ctx);
+ dev->security_ctx = NULL;
#endif
return ret;
--
2.27.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH v2 3/3] net/iavf: set pointer to NULL after free
[not found] <cover.1644927269.git.wangyunjian@huawei.com>
2022-02-15 13:01 ` [dpdk-dev] [PATCH v2 1/3] net/ixgbe: set pointer to NULL after free Yunjian Wang
2022-02-15 13:02 ` [dpdk-dev] [PATCH v2 2/3] net/txgbe: " Yunjian Wang
@ 2022-02-15 13:02 ` Yunjian Wang
2 siblings, 0 replies; 3+ messages in thread
From: Yunjian Wang @ 2022-02-15 13:02 UTC (permalink / raw)
To: dev
Cc: ferruh.yigit, jingjing.wu, beilei.xing, haiyue.wang, jiawenwu,
jianwang, dingxiaoxiong, huangshaozhang, Yunjian Wang, stable
When iavf_security_ctx_destroy() is cleaning up, it does not correctly
set the security_ctx variable to NULL, which will lead to wild pointer.
Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
drivers/net/iavf/iavf_ipsec_crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index 6ac1b213db..a63e42f29a 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1553,8 +1553,8 @@ iavf_security_ctx_destroy(struct iavf_adapter *adapter)
rte_free(iavf_sctx);
rte_free(sctx);
- iavf_sctx = NULL;
- sctx = NULL;
+ adapter->security_ctx = NULL;
+ adapter->vf.eth_dev->security_ctx = NULL;
return 0;
}
--
2.27.0
^ permalink raw reply [flat|nested] 3+ messages in thread