automatic DPDK test reports
 help / color / mirror / Atom feed
From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: |WARNING| pw113658 [PATCH] [v3] examples/fips_validation: fix memory leak in sha test
Date: Mon,  4 Jul 2022 06:10:11 -0400 (EDT)	[thread overview]
Message-ID: <20220704101011.D72CE6D34A@noxus.dpdklab.iol.unh.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 2630 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/113658

_apply patch failure_

Submitter: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Monday, July 04 2022 09:55:03 
Applied on: CommitID:7cac53f205ebd04d8ebd3ee6a9dd84f698d4ada3
Apply patch set 113658 failed:

Checking patch doc/guides/sample_app_ug/fips_validation.rst...
error: while searching for:
    * AES-CMAC (128,192,256) - AFT
    * AES-XTS (128,256) - AFT
    * HMAC (SHA1, SHA224, SHA256, SHA384, SHA512)
    * SHA (1,256) - AFT, MCT


Application Information

error: patch failed: doc/guides/sample_app_ug/fips_validation.rst:63
Checking patch examples/fips_validation/fips_validation_sha.c...
error: while searching for:
	for (i = 0; i < RTE_DIM(phsc); i++) {
		if (info.interim_info.sha_data.algo == phsc[i].algo) {
			vec.cipher_auth.digest.len = atoi(phsc[i].str);
			vec.cipher_auth.digest.val = calloc(0, vec.cipher_auth.digest.len * 8);
			break;
		}
	}

	if (i == RTE_DIM(phsc))
		return -1;

	return 0;
}

error: patch failed: examples/fips_validation/fips_validation_sha.c:229
Checking patch examples/fips_validation/main.c...
Hunk #1 succeeded at 2077 (offset -22 lines).
Applying patch doc/guides/sample_app_ug/fips_validation.rst with 1 reject...
Rejected hunk #1.
Applying patch examples/fips_validation/fips_validation_sha.c with 1 reject...
Rejected hunk #1.
Applied patch examples/fips_validation/main.c cleanly.
diff a/doc/guides/sample_app_ug/fips_validation.rst b/doc/guides/sample_app_ug/fips_validation.rst	(rejected hunks)
@@ -63,7 +63,7 @@ ACVP
     * AES-CMAC (128,192,256) - AFT
     * AES-XTS (128,256) - AFT
     * HMAC (SHA1, SHA224, SHA256, SHA384, SHA512)
-    * SHA (1,256) - AFT, MCT
+    * SHA (1, 256, 384, 512) - AFT, MCT
 
 
 Application Information
diff a/examples/fips_validation/fips_validation_sha.c b/examples/fips_validation/fips_validation_sha.c	(rejected hunks)
@@ -229,13 +229,20 @@ parse_test_sha_json_algorithm(void)
 	for (i = 0; i < RTE_DIM(phsc); i++) {
 		if (info.interim_info.sha_data.algo == phsc[i].algo) {
 			vec.cipher_auth.digest.len = atoi(phsc[i].str);
-			vec.cipher_auth.digest.val = calloc(0, vec.cipher_auth.digest.len * 8);
+			free(vec.cipher_auth.digest.val);
+			vec.cipher_auth.digest.val = calloc(1, vec.cipher_auth.digest.len);
+			if (vec.cipher_auth.digest.val == NULL)
+				return -1;
+
 			break;
 		}
 	}
 
-	if (i == RTE_DIM(phsc))
+	if (i == RTE_DIM(phsc)) {
+		free(vec.cipher_auth.digest.val);
+		vec.cipher_auth.digest.val = NULL;
 		return -1;
+	}
 
 	return 0;
 }

https://lab.dpdk.org/results/dashboard/patchsets/22901/

UNH-IOL DPDK Community Lab

                 reply	other threads:[~2022-07-04 10:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220704101011.D72CE6D34A@noxus.dpdklab.iol.unh.edu \
    --to=dpdklab@iol.unh.edu \
    --cc=dpdk-test-reports@iol.unh.edu \
    --cc=test-report@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).