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 8E597A054F; Sat, 4 Jun 2022 10:37:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37E514021E; Sat, 4 Jun 2022 10:37:36 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by mails.dpdk.org (Postfix) with ESMTP id 6163840041; Sat, 4 Jun 2022 10:37:35 +0200 (CEST) Received: from LT2ubnt.fritz.box (ip-062-143-094-109.um16.pools.vodafone-ip.de [62.143.94.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id AEFB93F801; Sat, 4 Jun 2022 08:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1654331851; bh=0Nhfu5DYN6u933rjLLG8CKbWVRoNx7d6eobVTLbWDRg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=kFX/nU8pXk/vxF1iW4dDx2QlMj2L7NMkDy0+jpZcjNk01WS24VqRKAXbiN+DH34qA wYIeZlMedRbgh+sR2cS/yjWs0PBZwW07+ggUsfitzO4Q34RSvhc415EnB3htDLfpyw NxzwTbcZd+CEX6PyVm4GqgMjVpYbxNA7Tt29vQ/kWqz58MbIecSJtWVqPqJvzpB802 6hdVifWANng0PufXlOurAzvO3PCcw2ap6yk2PtyYIUmixP9CZn0hKAmHAqBnFhgMTh 67djSzjWJ9aFnmhj6fCdhzc2s+ydEx4YK9Myp6kUnBQKqVLyyDltegY4Tbr+5HJ5T3 A/ncDwEwklTkA== From: Heinrich Schuchardt To: dev@dpdk.org Cc: Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin , Gavin Hu , Dharmik Thakkar , Honnappa Nagarahalli , Heinrich Schuchardt , stable@dpdk.org Subject: [PATCH] test/hash: avoid out of bound access Date: Sat, 4 Jun 2022 10:37:11 +0200 Message-Id: <20220604083711.64199-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org rwc_non_lf_results->multi_rw, rwc_lf_results->multi_rw, and rwc_perf_results->multi_rw are accessed at indexes [0..NUM_TEST-1][0..1][0..NUMTEST-1]. Currently the first index overflows the array size in struct rwc_perf. Fixes: c7eb0972e74b ("test/test/test_hash_readwrite_lf.c") Cc: Dharmik Thakkar Cc: stable@dpdk.org Signed-off-by: Heinrich Schuchardt --- app/test/test_hash_readwrite_lf_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c index 8120cf43be..32f9ec9250 100644 --- a/app/test/test_hash_readwrite_lf_perf.c +++ b/app/test/test_hash_readwrite_lf_perf.c @@ -59,7 +59,7 @@ struct rwc_perf { uint32_t w_ks_r_hit_nsp[2][NUM_TEST]; uint32_t w_ks_r_hit_sp[2][NUM_TEST]; uint32_t w_ks_r_miss[2][NUM_TEST]; - uint32_t multi_rw[NUM_TEST - 1][2][NUM_TEST]; + uint32_t multi_rw[NUM_TEST][2][NUM_TEST]; uint32_t w_ks_r_hit_extbkt[2][NUM_TEST]; uint32_t writer_add_del[NUM_TEST]; }; -- 2.36.1