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 A7929A0524 for ; Tue, 13 Apr 2021 10:11:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94EF8160970; Tue, 13 Apr 2021 10:11:40 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 4583B160970; Tue, 13 Apr 2021 10:11:38 +0200 (CEST) IronPort-SDR: 497LTB/caOOPY9NNQxbV/7j8+im8ZxAUaULjw/77Fw44AVFdqPivbfnMitB9JOa0NDHanwtf3c c5lGDL68I95Q== X-IronPort-AV: E=McAfee;i="6200,9189,9952"; a="194479191" X-IronPort-AV: E=Sophos;i="5.82,218,1613462400"; d="scan'208";a="194479191" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 01:11:25 -0700 IronPort-SDR: VPkbM2oCmuiVpvUKjCiQ1ZkCVS82PBM5dFAsOPHWLZhabGEzH+6sZEbNbe/QVJS6DCUycBAdg0 IJ6H+s2xtxEQ== X-IronPort-AV: E=Sophos;i="5.82,218,1613462400"; d="scan'208";a="614852119" 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 01:11:23 -0700 From: Wenwu Ma To: olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru Cc: dev@dpdk.org, Wenwu Ma , stable@dpdk.org Date: Tue, 13 Apr 2021 20:05:13 +0000 Message-Id: <20210413200513.330399-1-wenwux.ma@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210331210557.4919-1-wenwux.ma@intel.com> References: <20210331210557.4919-1-wenwux.ma@intel.com> 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