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 A3D84A0524 for ; Tue, 13 Apr 2021 09:28:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7961A160BA1; Tue, 13 Apr 2021 09:28:19 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 97E02160BA1 for ; Tue, 13 Apr 2021 09:28:17 +0200 (CEST) IronPort-SDR: GjLX9LtJMTMwholX4om9rZzJgn28/8uegmkWKFum/KoyWEjAbf55tfblwBwacxlHqqYqgxnaWr TT6EpNyNTA0A== X-IronPort-AV: E=McAfee;i="6200,9189,9952"; a="279662478" X-IronPort-AV: E=Sophos;i="5.82,218,1613462400"; d="scan'208";a="279662478" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 00:28:16 -0700 IronPort-SDR: 4NGG+Vydnv95wHZjGoDaa3jYbw61PKhIDhOlyiJznfb34/Ub8BKgim8uPoUsJ0KC56KR4NVnlp h4waYh7mriUw== X-IronPort-AV: E=Sophos;i="5.82,218,1613462400"; d="scan'208";a="614839484" Received: from unknown (HELO localhost.localdomain) ([10.240.183.109]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 00:28:15 -0700 From: Wenwu Ma To: wenwux.ma@intel.com Cc: stable@dpdk.org Date: Tue, 13 Apr 2021 19:22:03 +0000 Message-Id: <20210413192203.330112-1-wenwux.ma@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [v2] test/mempool: fix heap buffer overflow 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 Sender: "stable" Amount of allocated memory was not enough for mempool which cause buffer overflow when access fields of mempool private structure in the rte_pktmbuf_priv_size function. Fixes: 923ceaeac140 ("test/mempool: add unit test cases") Cc: stable@dpdk.org Signed-off-by: Wenwu Ma --- v2: - refine commit log. --- app/test/test_mempool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c index 084842fda..fc06a9c6f 100644 --- a/app/test/test_mempool.c +++ b/app/test/test_mempool.c @@ -543,7 +543,8 @@ test_mempool(void) mp_stack_mempool_iter = rte_mempool_create("test_iter_obj", MEMPOOL_SIZE, MEMPOOL_ELT_SIZE, - RTE_MEMPOOL_CACHE_MAX_SIZE, 0, + RTE_MEMPOOL_CACHE_MAX_SIZE, + sizeof(struct rte_pktmbuf_pool_private), NULL, NULL, my_obj_init, NULL, SOCKET_ID_ANY, 0); -- 2.25.1