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 15151A0A02; Thu, 15 Apr 2021 04:04:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9D0F160AF9; Thu, 15 Apr 2021 04:04:20 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 4A04A161EE9 for ; Thu, 15 Apr 2021 04:04:19 +0200 (CEST) IronPort-SDR: xAANrkYDb70UBedh/zywO1O8zoOeLj+m1X+iOZ24db38RJdIVMmPZjf6qFNiLueV2WwZg3kt80 Tv2/beh2TK3Q== X-IronPort-AV: E=McAfee;i="6200,9189,9954"; a="194338275" X-IronPort-AV: E=Sophos;i="5.82,223,1613462400"; d="scan'208";a="194338275" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2021 19:04:18 -0700 IronPort-SDR: NvRRLSqd/85XbULiV++wz2LeNgi5Hh8tcRG5kRbEMlv/lVJSZVn5FMwyRXCSYQyoWOU250+MHi 2gcqpaRRFILg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,223,1613462400"; d="scan'208";a="452721847" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga002.fm.intel.com with ESMTP; 14 Apr 2021 19:04:18 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 14 Apr 2021 19:04:17 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 14 Apr 2021 19:04:17 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Wed, 14 Apr 2021 19:04:17 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Wed, 14 Apr 2021 19:04:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ggl5AokqgsHKFmrsBlCW1HbnCVOm/sDHeLc+lugUBOr9Mzkh9ZNJBy8Vzki+eiF5DckNfu6i9vwALqvZnwybp5ASR55BEdIvWYQmkLht1sSwQEQsLTKlQa11ay6mRUVppn+wM8jgavxCh4g88wlbXizHv8fPXM/ehWMGwHEAXIEW4PsCZ5iSFknrrfB+EjJ9432KWhaMzSnzvD2cTwftVFmryzv3C+gXAtg80b7CNUZrr0e+4jWU5YnJX+paJT9dph7I8RiCQrZrQbVbEgDZ753MY2YmNvhv7xmL8zhZozYqosKNaKZ/mydBbK/Of5qJxoQlO6y842/TEmrJ+umT5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4pubILp61uKjvnQLBHuvU4sDgRpJSAi+P3LXAVe9r9M=; b=kqJoMMVuVNG+SLBYVxRn0jJhO3A8zNANHnRFgA1b3eyH/JulODpO0UCnSZJIf0RPboF1z1ouUOUZ3G+l24bZ99lsd+QCMnDRxZvEItcyUHcaj/OPQmBzVPycK+5OnE4S2Hau8CuZ06EgJJawPvwp4r/QoLJ8RBOLTFGNscOITLRg8zatStGXJKhM3ZyEfGu4FCdBfhgVfEPqgVBWZRhL1OoHxSG+tcaErqgqS9EYC7HG0xVWs02A1zrPMqH5go+f71ttbR3Q31r4Loz8uBHvrFwRDrmirFuUkJdJI3P3vntWvorsl0GQyx3EhGEhhuUpTvm6gYYdvUdckZD6I389bw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4pubILp61uKjvnQLBHuvU4sDgRpJSAi+P3LXAVe9r9M=; b=pe3fwgCaMowKB4l4IHRTmwhk6VghZ/VpSYF3r75BPItSGk2/miW/fArE8GjakWKf1V0uQ8yH0h2uoOjWLqusXy9W2eQeLm+bxAJCbGscOS1b7H4RtlFEKRn2z+SyfFEe8TPSfu91QUt9JsfQ//DZoUVajQyEAVremku7zAGQxfQ= Received: from MWHPR11MB1264.namprd11.prod.outlook.com (2603:10b6:300:27::13) by MW3PR11MB4682.namprd11.prod.outlook.com (2603:10b6:303:2e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.18; Thu, 15 Apr 2021 02:04:16 +0000 Received: from MWHPR11MB1264.namprd11.prod.outlook.com ([fe80::2de0:bee7:e720:7736]) by MWHPR11MB1264.namprd11.prod.outlook.com ([fe80::2de0:bee7:e720:7736%12]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 02:04:16 +0000 From: "Peng, ZhihongX" To: "Ma, WenwuX" , "olivier.matz@6wind.com" , "andrew.rybchenko@oktetlabs.ru" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] test/mempool: Fix illegal pointer access in mempool test Thread-Index: AQHXJg4DgCHJMlUu6kK5ubvzU/Sulqq06uIA Date: Thu, 15 Apr 2021 02:04:16 +0000 Message-ID: References: <20210331210557.4919-1-wenwux.ma@intel.com> In-Reply-To: <20210331210557.4919-1-wenwux.ma@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.55] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 93ceb05a-dd18-4241-ee8c-08d8ffb2c612 x-ms-traffictypediagnostic: MW3PR11MB4682: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2043; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VFmlFajoNWP6iQrRo4jKYa2H1fkj7VHC83Lcz0arsg96ge1PAS28gj1pvO9N/eDtLeaVFIlV41VoCWD51xYHaLfsjyMNJY+Kz09UNLhrgqb0nZrytNcONrnLXVFATNIuQb1f8QhWNbWtyuDUCra8SUsJlVd+4qHBJN22BB7Lyq3jU5L/PTYYkT2yVs7cm2tpt0GNEz+s6u7QXRsdrCcLRWoBKdFQWu4/l/MY1TJ/aYKKLz4g48yXgFj5Xf90jdQs2pRwV7XyqGbKkHy/fMMJE8/js60ZOcHY5GQp6FhXz5aVsosCtjuwWsbDgqbXFmZF+Q9Utusn8Dvc8QXvClWM1pFt5EQ2BIQPZnk0D8I9eQAVax5dUT/fiGQuUH/fW0GgCNaKAHEpGZqi0f7KpvGdBzRXZkGlCeGZX1lYsF3lSBHOArMMsuleKAU4+TRbx8DuNyEp5V9VFKnLWYz3Im7/Q//g9L9qJTHUuKTqSRtm7icYSzfcCe8u6DxzaW4+GK6NPKH/HFrEiR26GTKyj6IEqvpxPpRF0ZpZc9j+TIhtrjdTjkvJ/VVFZwyBNhcAmfDDbvJ8hXj2Joe3hf0gpvxgH/v9G4K1QQ+AdWB12/bTFjQ= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1264.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(366004)(346002)(39860400002)(376002)(136003)(38100700002)(122000001)(83380400001)(7696005)(9686003)(8936002)(316002)(5660300002)(66476007)(33656002)(86362001)(52536014)(66446008)(66556008)(6506007)(71200400001)(26005)(53546011)(8676002)(64756008)(66946007)(478600001)(186003)(2906002)(76116006)(55016002)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?zeaj2kTi3axVNitR2owPi6UtU0TQlGI55G8NyyKNsfO/PK5UlC+dewosTFDd?= =?us-ascii?Q?7cPV0BCN4+VL49tPU7Xawcf1PYFZXxujDtTipWJjOEmKNdwwE625hSEIIP0d?= =?us-ascii?Q?m96jo3qegtRc90qe8qLOaVJQKPMBYFXhOCylTaEQPAAP9WS51xP22A9ihsKF?= =?us-ascii?Q?ueE6YEJ/I0fbQF+vJe8F9OgVQWlGk6+7ZwiEx1U4fkytXNL4ggaU8khetUfR?= =?us-ascii?Q?BLUoJWFEi/B/bUDzU2N71oQhFBIHUu5xfEPwvd5rK7lNstwqB/c9cq8Y7YdJ?= =?us-ascii?Q?J2sFGZ4dq/qR19kU1nDeo+Ksj68exgyqRpqVOcI+iGAAbjtEB2Ws9yV0Tp8k?= =?us-ascii?Q?YTYAhp3U/FabWY5243LjZXMPGUEkeG6jfmqnT1n+HsvNcvgvUz8snIg+A776?= =?us-ascii?Q?37PtP4GpeH1fsz6funQSFMI6qA/qwTwD2JzRQIqEP6sDduzU6X6RI98Ywa6n?= =?us-ascii?Q?pTVGuOLTYpsh2ofJQRPqoQwNYYj+aHHvUvnkPPv6xUbUs3Rpqd49Erbu9f/U?= =?us-ascii?Q?Gv1CKJrL3g7ogbc3e7aUnKwTguS94EDHVn6+8cDVlKh4ptKAJIeLY0zqNqIB?= =?us-ascii?Q?u6zP+sDZQWOB77zd4dl6fLWd23AB88JBBVEzRBvB4eHCgpacQZVxgs4XQtet?= =?us-ascii?Q?bztl9f0NgW2FWy+2/w3zcOm8OiGHyp8JLyiy6qpX6Act9mDHMbkvsutmCwBf?= =?us-ascii?Q?lTw4wePOVSzqIvYHwH8DZcJDsytJeQKUs9Nn4x04vkUoDBOdd8YLutGUxi6F?= =?us-ascii?Q?g6rC9goa3X/RBHz1UrZv1s9dyeKeysScdAm+D/NrbJ/Wq7mLfVoqAwBXeW8Z?= =?us-ascii?Q?oWGzBmFBQagD6nzVzdiXXIJbmdC2wcDj6Lu7XtsEuUIYCfJK/VAzYMzKKPXU?= =?us-ascii?Q?Vv9zGOW3+rvRJ1KhIKWlVyMS9nx98Qi7/dBnOHZqrn/JDFkeMQ0djVJSRDh0?= =?us-ascii?Q?1DsNOVueH/yAUUDMPBTlMdbOnwNIA5oSHq610El2dvZQRV7SAJg1e1DxRDt7?= =?us-ascii?Q?wghcXUUIpUSi9TwQRZvr0QeQJJUBq+jXnF9ltaDu2t5vXg5KnGwul2K1J0T3?= =?us-ascii?Q?Vt/eNWOZLQzWVyNGqSykdle27q1zSbK6GDFFhwczwLBqFdGebhljOzXCtwh0?= =?us-ascii?Q?xrxP9go8MpTA0LG/t1Syp7D0hLY8OZ8FNJQVWiRMdP9YRffKykZHtfV2y6sb?= =?us-ascii?Q?ZZAy/0kQRIHT+Np33061y9KkllAB70Y5ruq1qdeKfMMtCh1Bu/B1/lBlkE9M?= =?us-ascii?Q?1ZNOoL1gkeKVAg2XjoQc7pHhFlD23v+LuVW6eOLvamH75JFROMuKfkFQY0xQ?= =?us-ascii?Q?XOws0za9BDaIrpw/MlQTx7Zo?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1264.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93ceb05a-dd18-4241-ee8c-08d8ffb2c612 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2021 02:04:16.4676 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DFu8oprbJeImp4sLwG+nWQHp+NZGptJi3pk2P2LTuv1uqACCyrKQRCHlVA8ihZVJA/bNnuGEi/f9hxcfxl2CDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4682 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] test/mempool: Fix illegal pointer access in mempool test 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 Sender: "dev" -----Original Message----- From: dev On Behalf Of Wenwu Ma Sent: Thursday, April 1, 2021 5:06 AM To: olivier.matz@6wind.com; andrew.rybchenko@oktetlabs.ru; dev@dpdk.org Subject: [dpdk-dev] [PATCH] test/mempool: Fix illegal pointer access in mem= pool test The value of parameter private_data_size of function rte_mempool_create() called in test_mempool() should not be 0, Otherwise, t= he function rte_pktmbuf_priv_size() called in rte_pktmbuf_init() will cause heap-buffer-overflow. Signed-off-by: Wenwu Ma --- 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 084842= fda..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 =3D 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 Tested-by: Peng Zhihong