[dpdk-stable] patch 'crypto/nitrox: fix oversized device name' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 14:54:15 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 b9b72b8815d6b90fee1d516c80edc1e61917ae59 Mon Sep 17 00:00:00 2001
From: Nagadheeraj Rottela <rnagadheeraj at marvell.com>
Date: Fri, 27 Mar 2020 19:12:39 +0530
Subject: [PATCH] crypto/nitrox: fix oversized device name

[ upstream commit 9614b472a3af771f68ba4f99a034de3b4da99ef7 ]

In nitrox_sym_pmd_create() the name array will overflow if the pci
device name is greater than 57 bytes. To fix this issue subtract pci
device name length from array length while appending substring to the
name.

Coverity issue: 349926
Fixes: 9fdef0cc2385 ("crypto/nitrox: create symmetric cryptodev")

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj at marvell.com>
Acked-by: Akhil Goyal <akhil.goyal at nxp.com>
---
 drivers/crypto/nitrox/nitrox_sym.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index 56410c44d7..d1b32fec92 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -683,7 +683,8 @@ nitrox_sym_pmd_create(struct nitrox_device *ndev)
 	struct rte_cryptodev *cdev;
 
 	rte_pci_device_name(&ndev->pdev->addr, name, sizeof(name));
-	snprintf(name + strlen(name), RTE_CRYPTODEV_NAME_MAX_LEN, "_n5sym");
+	snprintf(name + strlen(name), RTE_CRYPTODEV_NAME_MAX_LEN - strlen(name),
+		 "_n5sym");
 	ndev->rte_sym_dev.driver = &nitrox_rte_sym_drv;
 	ndev->rte_sym_dev.numa_node = ndev->pdev->device.numa_node;
 	ndev->rte_sym_dev.devargs = NULL;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.468783355 +0100
+++ 0065-crypto-nitrox-fix-oversized-device-name.patch	2020-05-19 13:56:18.295503187 +0100
@@ -1,8 +1,10 @@
-From 9614b472a3af771f68ba4f99a034de3b4da99ef7 Mon Sep 17 00:00:00 2001
+From b9b72b8815d6b90fee1d516c80edc1e61917ae59 Mon Sep 17 00:00:00 2001
 From: Nagadheeraj Rottela <rnagadheeraj at marvell.com>
 Date: Fri, 27 Mar 2020 19:12:39 +0530
 Subject: [PATCH] crypto/nitrox: fix oversized device name
 
+[ upstream commit 9614b472a3af771f68ba4f99a034de3b4da99ef7 ]
+
 In nitrox_sym_pmd_create() the name array will overflow if the pci
 device name is greater than 57 bytes. To fix this issue subtract pci
 device name length from array length while appending substring to the
@@ -10,7 +12,6 @@
 
 Coverity issue: 349926
 Fixes: 9fdef0cc2385 ("crypto/nitrox: create symmetric cryptodev")
-Cc: stable at dpdk.org
 
 Signed-off-by: Nagadheeraj Rottela <rnagadheeraj at marvell.com>
 Acked-by: Akhil Goyal <akhil.goyal at nxp.com>


More information about the stable mailing list