patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] app/test: fix possible overflow with strcat
@ 2019-03-14 13:14 Chaitanya Babu Talluri
  2019-03-18 12:36 ` [dpdk-stable] [PATCH v2] app/test: fix possible overflow using strlcat Chaitanya Babu Talluri
  0 siblings, 1 reply; 4+ messages in thread
From: Chaitanya Babu Talluri @ 2019-03-14 13:14 UTC (permalink / raw)
  To: dev
  Cc: reshma.pattan, jananeex.m.parthasarathy, pablo.de.lara.guarch,
	declan.doherty, Chaitanya Babu Talluri, stable

strcat does not check the destination length and there might be
chances of string overflow so instead of strcat, strlcat is used.

Fixes: 6f4eec2565 ("test/crypto: enhance scheduler unit tests")
Cc: stable@dpdk.org

Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
---
 app/test/test_cryptodev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 32f1893bc..2ff204137 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -15,6 +15,7 @@
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
+#include <rte_string_fns.h>
 
 #ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
 #include <rte_cryptodev_scheduler.h>
@@ -375,7 +376,7 @@ testsuite_setup(void)
 			snprintf(vdev_args, sizeof(vdev_args),
 					"%s%d", temp_str, i);
 			strcpy(temp_str, vdev_args);
-			strcat(temp_str, ";");
+			strlcat(temp_str, ";", sizeof(temp_str));
 			slave_core_count++;
 			socket_id = lcore_config[i].socket_id;
 		}
-- 
2.17.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-stable] [PATCH v2] app/test: fix possible overflow using strlcat
  2019-03-14 13:14 [dpdk-stable] [PATCH] app/test: fix possible overflow with strcat Chaitanya Babu Talluri
@ 2019-03-18 12:36 ` Chaitanya Babu Talluri
  2019-03-22 14:31   ` [dpdk-stable] [dpdk-dev] " Akhil Goyal
  0 siblings, 1 reply; 4+ messages in thread
From: Chaitanya Babu Talluri @ 2019-03-18 12:36 UTC (permalink / raw)
  To: dev
  Cc: reshma.pattan, jananeex.m.parthasarathy, pablo.de.lara.guarch,
	declan.doherty, Chaitanya Babu Talluri, stable

strcat does not check the destination length and there might be
chances of string overflow so instead of strcat, strlcat is used.

Fixes: 6f4eec2565 ("test/crypto: enhance scheduler unit tests")
Cc: stable@dpdk.org

Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
---
v2: Updated title.
---
 app/test/test_cryptodev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 32f1893bc..2ff204137 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -15,6 +15,7 @@
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
+#include <rte_string_fns.h>
 
 #ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
 #include <rte_cryptodev_scheduler.h>
@@ -375,7 +376,7 @@ testsuite_setup(void)
 			snprintf(vdev_args, sizeof(vdev_args),
 					"%s%d", temp_str, i);
 			strcpy(temp_str, vdev_args);
-			strcat(temp_str, ";");
+			strlcat(temp_str, ";", sizeof(temp_str));
 			slave_core_count++;
 			socket_id = lcore_config[i].socket_id;
 		}
-- 
2.17.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] app/test: fix possible overflow using strlcat
  2019-03-18 12:36 ` [dpdk-stable] [PATCH v2] app/test: fix possible overflow using strlcat Chaitanya Babu Talluri
@ 2019-03-22 14:31   ` Akhil Goyal
  2019-03-22 15:07     ` Akhil Goyal
  0 siblings, 1 reply; 4+ messages in thread
From: Akhil Goyal @ 2019-03-22 14:31 UTC (permalink / raw)
  To: Chaitanya Babu Talluri, dev
  Cc: reshma.pattan, jananeex.m.parthasarathy, pablo.de.lara.guarch,
	declan.doherty, stable



On 3/18/2019 6:06 PM, Chaitanya Babu Talluri wrote:
> strcat does not check the destination length and there might be
> chances of string overflow so instead of strcat, strlcat is used.
>
> Fixes: 6f4eec2565 ("test/crypto: enhance scheduler unit tests")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
> ---
> v2: Updated title.
> ---
>   app/test/test_cryptodev.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] app/test: fix possible overflow using strlcat
  2019-03-22 14:31   ` [dpdk-stable] [dpdk-dev] " Akhil Goyal
@ 2019-03-22 15:07     ` Akhil Goyal
  0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2019-03-22 15:07 UTC (permalink / raw)
  To: Chaitanya Babu Talluri, dev
  Cc: reshma.pattan, jananeex.m.parthasarathy, pablo.de.lara.guarch,
	declan.doherty, stable



On 3/22/2019 8:01 PM, Akhil Goyal wrote:
>
> On 3/18/2019 6:06 PM, Chaitanya Babu Talluri wrote:
>> strcat does not check the destination length and there might be
>> chances of string overflow so instead of strcat, strlcat is used.
>>
>> Fixes: 6f4eec2565 ("test/crypto: enhance scheduler unit tests")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
>> ---
>> v2: Updated title.
>> ---
>>    app/test/test_cryptodev.c | 3 ++-
>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>
>>
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Applied to dpdk-next-crypto

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-22 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-14 13:14 [dpdk-stable] [PATCH] app/test: fix possible overflow with strcat Chaitanya Babu Talluri
2019-03-18 12:36 ` [dpdk-stable] [PATCH v2] app/test: fix possible overflow using strlcat Chaitanya Babu Talluri
2019-03-22 14:31   ` [dpdk-stable] [dpdk-dev] " Akhil Goyal
2019-03-22 15:07     ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).