[dpdk-stable] patch 'security: fix crash at accessing non-implemented ops' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Thu May 28 18:23:15 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/03/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ce2659e1c2ea294658762f9322447989fe107a6f

Thanks.

Kevin.

---
>From ce2659e1c2ea294658762f9322447989fe107a6f Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev at intel.com>
Date: Thu, 23 Apr 2020 16:10:42 +0100
Subject: [PATCH] security: fix crash at accessing non-implemented ops

[ upstream commit 34dff8bacc7b95cc288c24894443bd356e453b64 ]

Valid checks for optional function pointers inside dev-ops
were disabled by undefined macro.

Fixes: b6ee98547847 ("security: fix verification of parameters")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Acked-by: Akhil Goyal <akhil.goyal at nxp.com>
---
 lib/librte_security/rte_security.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index 56f30c88ba..6ff7a9e69b 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -109,8 +109,9 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
 {
 #ifdef RTE_DEBUG
-	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, set_pkt_metadata, -EINVAL,
-			-ENOTSUP);
 	RTE_PTR_OR_ERR_RET(sess, -EINVAL);
+	RTE_PTR_OR_ERR_RET(instance, -EINVAL);
+	RTE_PTR_OR_ERR_RET(instance->ops, -EINVAL);
 #endif
+	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->set_pkt_metadata, -ENOTSUP);
 	return instance->ops->set_pkt_metadata(instance->device,
 					       sess, m, params);
@@ -123,6 +124,8 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
 
 #ifdef RTE_DEBUG
-	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, get_userdata, NULL, NULL);
+	RTE_PTR_OR_ERR_RET(instance, NULL);
+	RTE_PTR_OR_ERR_RET(instance->ops, NULL);
 #endif
+	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->get_userdata, NULL);
 	if (instance->ops->get_userdata(instance->device, md, &userdata))
 		return NULL;
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-28 17:13:03.669500197 +0100
+++ 0088-security-fix-crash-at-accessing-non-implemented-ops.patch	2020-05-28 17:12:59.181554590 +0100
@@ -1 +1 @@
-From 34dff8bacc7b95cc288c24894443bd356e453b64 Mon Sep 17 00:00:00 2001
+From ce2659e1c2ea294658762f9322447989fe107a6f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34dff8bacc7b95cc288c24894443bd356e453b64 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index d475b09771..dc9a3e89cd 100644
+index 56f30c88ba..6ff7a9e69b 100644



More information about the stable mailing list