[dpdk-stable] patch 'security: fix crash at accessing non-implemented ops' has been queued to stable release 19.11.3
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue May 19 15:04:11 CEST 2020
Hi,
FYI, your patch has been queued to stable release 19.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/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.
Thanks.
Luca Boccassi
---
>From 632fec749fda933bc9b25817165ad1bde21800ae 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 d475b09771..dc9a3e89cd 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -108,10 +108,11 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
struct rte_mbuf *m, void *params)
{
#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);
}
@@ -122,8 +123,10 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
void *userdata = NULL;
#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.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-05-19 14:04:49.215022709 +0100
+++ 0116-security-fix-crash-at-accessing-non-implemented-ops.patch 2020-05-19 14:04:44.384651418 +0100
@@ -1,13 +1,14 @@
-From 34dff8bacc7b95cc288c24894443bd356e453b64 Mon Sep 17 00:00:00 2001
+From 632fec749fda933bc9b25817165ad1bde21800ae 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")
-Cc: stable at dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Acked-by: Akhil Goyal <akhil.goyal at nxp.com>
More information about the stable
mailing list