From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8DC15455AD for ; Mon, 15 Jul 2024 17:28:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86537406B4; Mon, 15 Jul 2024 17:28:02 +0200 (CEST) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by mails.dpdk.org (Postfix) with ESMTP id A93DB402DD for ; Mon, 15 Jul 2024 17:28:00 +0200 (CEST) Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2eecd2c6432so61580981fa.3 for ; Mon, 15 Jul 2024 08:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057280; x=1721662080; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RHtyp/Z9W4u2E1lnLmuwVpXAw8kKNw0lW+gAd2MQ/XA=; b=JvsumjouWGI2vqcoWNUmPIPD5mUM+QeLZJqfshXI1xJ7h8SAhztR60g3S+GNNdxzUV ZBCWudYkehzdoRdqssoTPUSfK/k9vCo9K+Qlv735ZLewEW6b8ezKGQZNHjXABMvi3WJd iviO7ANiRevOYG5kxpCI5HSvENMuzkSpOWvhQ9Q37WWI+2ubU3HQUkgSFcvI715iTPSf D/Y9kKqwDRaPRD6lNb3BY8dLXh692FbYEGxjqPRXQ99kWRVN5eRW/ODrYgd12vcqFN/A hQVHbL609TvE4Cz6oyp69MC8PatIhhFz0pQOJ/7AWKIGPPISNrpgqidm+KhKdO8zu/2v e/dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057280; x=1721662080; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RHtyp/Z9W4u2E1lnLmuwVpXAw8kKNw0lW+gAd2MQ/XA=; b=A7g2WZUVUOtdGCWhSB6Ogaj++958yCZqa4mkxRRPi+wJPiEBGI8b85qDNSEYXSFum+ WNheaC/K1BgQBI6yggr/0F+65bLIwYFWJz6l6MPIz82aJkVvjnBc++qgdUqTck/dnizE ie9jwYFvof3EmEgF8uf93t0IaPZcTRpWlgjTgHs73XmjFfM0qzCddV23SPeJNN4j1j6i vmtx1Uy/dzEkP8OoPyjl7cz0KxM9u5ZfXpSioreAZUjbtIIagz0XuCblpUGbnDiBFPVh 9qxYw/pC2V0hEZq/He+gWYrI7XU8RSMuv0InJ5cVpCxZoijSifHaTgLMpFXlAqu7RU0v t9xQ== X-Forwarded-Encrypted: i=1; AJvYcCXdC14skO+5jwoV0TxT0f/iQ2s/HhmdfTo26x7goQTg0KduweH9+BrWiQO7e9aL0vZKarqX0MPZgmV+RJkMg04= X-Gm-Message-State: AOJu0YxXczmrmbIeboK1nf2ONH8W6N1OX+yJR+E//Oz9uonWa1+m8ASf CZ3LKUxgkfR8gQIh3qP3YpaXwwqm943ekwqCtyJv890hoWqDpsRt X-Google-Smtp-Source: AGHT+IEJbG00nRVx8jNuxfyG99jNKbv/i1d/v9Gbma1uhZjYZCQ4B7wpeD4AkhWqrQw0ZxNZzr9JPQ== X-Received: by 2002:a2e:9053:0:b0:2ec:5843:2fb8 with SMTP id 38308e7fff4ca-2eef2dbd746mr1594391fa.42.1721057280008; Mon, 15 Jul 2024 08:28:00 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5e83273sm91576725e9.17.2024.07.15.08.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:27:59 -0700 (PDT) From: luca.boccassi@gmail.com To: Gowrishankar Muthukrishnan Cc: Brian Dooley , dpdk stable Subject: patch 'examples/fips_validation: fix dereference and out-of-bound' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:25:54 +0100 Message-Id: <20240715152704.2229503-16-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Acked-by: Brian Dooley --- 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@dpdk.org