patch 'examples/fips_validation: fix dereference and out-of-bound' has been queued to stable release 22.11.6
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 15 17:25:54 CEST 2024
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7e6b9c068617106e9e0896894ba5b70356976ca9
Thanks.
Luca Boccassi
---
>From 7e6b9c068617106e9e0896894ba5b70356976ca9 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Date: Wed, 26 Jun 2024 15:56:23 +0530
Subject: [PATCH] examples/fips_validation: fix dereference and out-of-bound
[ upstream commit 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c ]
Fix NULL dereference, out-of-bound, bad bit shift issues
reported by coverity scan.
Coverity issue: 384440, 384435, 384433, 384429
Fixes: 36128a67c27e ("examples/fips_validation: add asymmetric validation")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Acked-by: Brian Dooley <brian.dooley at intel.com>
---
examples/fips_validation/fips_validation_rsa.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/examples/fips_validation/fips_validation_rsa.c b/examples/fips_validation/fips_validation_rsa.c
index f675b51051..55f81860a0 100644
--- a/examples/fips_validation/fips_validation_rsa.c
+++ b/examples/fips_validation/fips_validation_rsa.c
@@ -328,6 +328,9 @@ parse_test_rsa_json_interim_writeback(struct fips_val *val)
if (prepare_vec_rsa() < 0)
return -1;
+ if (!vec.rsa.e.val)
+ return -1;
+
writeback_hex_str("", info.one_line_text, &vec.rsa.n);
obj = json_string(info.one_line_text);
json_object_set_new(json_info.json_write_group, "n", obj);
@@ -474,7 +477,7 @@ fips_test_randomize_message(struct fips_val *msg, struct fips_val *rand)
uint16_t rv_len;
if (!msg->val || !rand->val || rand->len > RV_BUF_LEN
- || msg->len > FIPS_TEST_JSON_BUF_LEN)
+ || msg->len > (FIPS_TEST_JSON_BUF_LEN - 1))
return -EINVAL;
memset(rv, 0, sizeof(rv));
@@ -503,7 +506,7 @@ fips_test_randomize_message(struct fips_val *msg, struct fips_val *rand)
m[i + j] ^= rv[j];
m[i + j] = ((uint8_t *)&rv_bitlen)[0];
- m[i + j + 1] = (((uint8_t *)&rv_bitlen)[1] >> 8) & 0xFF;
+ m[i + j + 1] = ((uint8_t *)&rv_bitlen)[1];
rte_free(msg->val);
msg->len = (rv_bitlen + m_bitlen + 16) / 8;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.615184763 +0100
+++ 0016-examples-fips_validation-fix-dereference-and-out-of-.patch 2024-07-15 16:19:34.476204499 +0100
@@ -1 +1 @@
-From 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c Mon Sep 17 00:00:00 2001
+From 7e6b9c068617106e9e0896894ba5b70356976ca9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list