patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] app/crypto-perf: fix possible overflow
@ 2017-04-11 14:42 Pablo de Lara
  2017-04-17 21:44 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo de Lara @ 2017-04-11 14:42 UTC (permalink / raw)
  To: dev; +Cc: declan.doherty, stable, Pablo de Lara

In the latency test, when number of enqueued operations
is less than the burst size, the timestamp value of the
non-enqueued operations was being stored, even though
those operations were being freed.

This could cause an array overflow, since it could store
more values than the total number of operations.

Fixes: 5d75fb09d3be ("app/crypto-perf: fix invalid latency for QAT")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-crypto-perf/cperf_test_latency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index 3275b4b..e61ac97 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -396,7 +396,7 @@ cperf_latency_test_runner(void *arg)
 			for (i = ops_enqd; i < burst_size; i++)
 				rte_crypto_op_free(ops[i]);
 
-			for (i = 0; i < burst_size; i++) {
+			for (i = 0; i < ops_enqd; i++) {
 				ctx->res[tsc_idx].tsc_start = tsc_start;
 				ops[i]->opaque_data = (void *)&ctx->res[tsc_idx];
 				tsc_idx++;
-- 
2.7.4

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

* Re: [dpdk-stable] [PATCH] app/crypto-perf: fix possible overflow
  2017-04-11 14:42 [dpdk-stable] [PATCH] app/crypto-perf: fix possible overflow Pablo de Lara
@ 2017-04-17 21:44 ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 2+ messages in thread
From: De Lara Guarch, Pablo @ 2017-04-17 21:44 UTC (permalink / raw)
  To: dev; +Cc: Doherty, Declan, stable



> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Tuesday, April 11, 2017 3:43 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan; stable@dpdk.org; De Lara Guarch, Pablo
> Subject: [PATCH] app/crypto-perf: fix possible overflow
> 
> In the latency test, when number of enqueued operations
> is less than the burst size, the timestamp value of the
> non-enqueued operations was being stored, even though
> those operations were being freed.
> 
> This could cause an array overflow, since it could store
> more values than the total number of operations.
> 
> Fixes: 5d75fb09d3be ("app/crypto-perf: fix invalid latency for QAT")
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto.

Pablo

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

end of thread, other threads:[~2017-04-17 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 14:42 [dpdk-stable] [PATCH] app/crypto-perf: fix possible overflow Pablo de Lara
2017-04-17 21:44 ` De Lara Guarch, Pablo

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).