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 0892B45CE3 for ; Mon, 11 Nov 2024 07:31:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 002C74067A; Mon, 11 Nov 2024 07:31:32 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2058.outbound.protection.outlook.com [40.107.236.58]) by mails.dpdk.org (Postfix) with ESMTP id 342844067A for ; Mon, 11 Nov 2024 07:31:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Fv/gKiu1WyOnTM7ti6GJrMUW6FdfD7KIzM9ecYsnYlaAWxNhEIN0IdVbJcHA6ARBL/63XQJk4f3KNgiY0cSmUNuvivM95PeOVRJCcwWbiJ/PS1OyTynhoiqFMMggH8lhPVqQLgUto6Rn77raFM026DVqupcPm92kk+4d3qcL+kxL5MBF9BYj0t0XKWRazARLf7J7t2n/c6ATaHQEbn6ajf2KzfOkyW2iQhpaDDbvvPscR0h5yrye84rKYfN0kO4WTD1Xum4gmUDa6uhvNe34g1sJ+M46lNe1akLhh34tqL4cHcnn7JGdn9M4v5RGWbtFnp2x2X5L2g5rTqo5zyCNXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4wtgfKH4zx+JW1c2II4rm4mo4IsTZeWwHzFsePoldI0=; b=mld8ZwyhzrQGbtYWXujZnV/Uckl5s3sQ3SdAmHDqzZBqi/RsU0rEMfYpJC/ZktOHSzfN8Y8u7MZhZdWoIYnAzjSzWwxiB9huqoFojcNIJyKaja3hG5zB2BCBKrABZxylQs9SfAW97y7bxXccC5880gOAbOiqLV/20EZ1o+FG8Fr1KERwABkfFCQgyeAIQ9fvLF+hg6pb68Xt5mq/v5T2NvIE4uzBg/TeQOXLdk8kxGYqhrRLAUjzrqAHVvPEQah4OdRu00VzPawaDoVIQBHKXqSaSvaj7/05P676ryNtnDdPUVshMtGSJrAVi43/ZumseIts5EOyfxDJqIO0wENbnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=networkplumber.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4wtgfKH4zx+JW1c2II4rm4mo4IsTZeWwHzFsePoldI0=; b=mrhT/x7l8wtn0EO8hbvsu3mEMH/T8E/wds2ipCXoA3rlvu3WvsQStvHrpXrrKaNC+WSYS2Ml0VlPsWi4GizQ7rQVOBU733G586wr7cmDkxWWxNdnjRgMqa9kHvKhnG2pQk1kNcbH+cXg8orRzJbyhLoMpzvmjVN0e9ukmnUm0hdWKdJptNuodNqhxiszv13MC7HQ40zaU9qU4zCbdfpTluItPQWfvb5e0ZOa89FTdTU701vT3UeFClcok0eII/M6waD/n0LFsH7pU6QZJcjhWiSNekeYQvewo1VcZqzvU9J3xfRAuu4v5xcbge4u4Slj8dYvHgVrJZ+2024lIyESng== Received: from BLAPR05CA0020.namprd05.prod.outlook.com (2603:10b6:208:36e::23) by SN7PR12MB7105.namprd12.prod.outlook.com (2603:10b6:806:2a0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.21; Mon, 11 Nov 2024 06:31:29 +0000 Received: from BN2PEPF000055DD.namprd21.prod.outlook.com (2603:10b6:208:36e:cafe::3f) by BLAPR05CA0020.outlook.office365.com (2603:10b6:208:36e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:31:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN2PEPF000055DD.mail.protection.outlook.com (10.167.245.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.1 via Frontend Transport; Mon, 11 Nov 2024 06:31:28 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:31:15 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:31:13 -0800 From: Xueming Li To: Stephen Hemminger CC: , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Konstantin Ananyev , Wathsala Vithanage , dpdk stable Subject: patch 'net/cnxk: fix use after free in mempool create' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:06 +0800 Message-ID: <20241111062847.216344-21-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000055DD:EE_|SN7PR12MB7105:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f0f3e87-62fe-4cdf-931e-08dd021a7980 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?MW1JM0dXRDhuWWxOb3lmTUhQbVRTWFNNcHlqK3k0K2pZZUdWWVhKWVVleFB6?= =?utf-8?B?TEs3RTJTcndJc3dUUUdMSFc1clNLdjJkalFvc28vOW81cTlZZzh0S1FuN2pz?= =?utf-8?B?VWIrMUYvM1dIcXZTSllhTkdGamhHbWNJc1NJOUhzN1JlM2RvSTM5MzBuZVJZ?= =?utf-8?B?MzRuSDhwaXRCY3pTT1I2TVlyU3dBY1NUelZ0d1hEemVpMHJRVGJjUURZV1k2?= =?utf-8?B?Y2J3djdWbjdQYUZUdWdHY0J1dXNPL0Fmak4rMnRZRXJJWjJ6RXBDemxtbXg4?= =?utf-8?B?Z0FPazk3L0R4N1czckp4bi9xanpHVFVxZGtrWjZ1UlAxYW83ZVhJdzBsQ3Zu?= =?utf-8?B?K25sQlY4Q2JPZ0RSUzYzdi8wZ2ZkWDhsV0EzZC9XeU5CV0tCV3o3dDBOSzBF?= =?utf-8?B?c0tIS296Y1B6azBUQUpIWTdjY0lma1pXTkRHb2Y2b0ZjeHBRZWN0bE91VHJz?= =?utf-8?B?VkF3VURPYVJrNkhkLzh5cGtCSDZjcGxMN1IxRGdmUGRHOFNGRU1jcFNZU0Np?= =?utf-8?B?RFNlcUls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pQelp5WEo1VWk2ajNJYkh2SmpjRzhXSnQxVUpQd3V6cDJLWGRoOWhKNHd6?= =?utf-8?B?YzVST0l1VFNROFhzenpNaXRtR2ZVUHp5R3pNZG1BU0tYZ2Q1WHY3L2FpcUtV?= =?utf-8?B?YmMxdjBsQ3NsRDlDS1pqdnYvbTlpTzhDOFdJMFdnV3NSa1V2SmlLL1E0RXo5?= =?utf-8?B?THlsRmY0aG5IMlZXc3BHVm5pbHVxUG5wSFNUd1EyNEp1OFpHTmErNXlLeHh2?= =?utf-8?B?ZWNOZHNKUVlYQVBKV3VDRnpqRWU3czNRZnBvTmpzdEpINEFEMm9wTlg1Y1Fj?= =?utf-8?B?RHVDNGJ3aStzZXVCd3FDbXIvV2JmZnBUWnhHZm03OU9PcVNpWWRnWTUwcE9a?= =?utf-8?B?S3NpU0JacEtja0RlY3RsTGpVZGdnWDF4S1U1VEtYWU5kci9GSEtJTTNMK1pI?= =?utf-8?B?SmFMTVlrd3NVU05HTkkydVdScVFSbW5oN1NhM2lEci9KN1E9PQ==?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(36860700013)(82310400026)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:31:28.5321 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f0f3e87-62fe-4cdf-931e-08dd021a7980 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000055DD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7105 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 23.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c033d1168d448b3e4bb2b991abaac255331ed056 Thanks. Xueming Li --- >From c033d1168d448b3e4bb2b991abaac255331ed056 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Oct 2024 09:47:10 -0700 Subject: [PATCH] net/cnxk: fix use after free in mempool create MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit c024de17933128f37b1dfe38a0fae9975be1b104 ] The driver would refer to the mempool object after it was freed. Bugzilla ID: 1554 Fixes: 7ea187184a51 ("common/cnxk: support 1-N pool-aura per NIX LF") Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup Acked-by: Konstantin Ananyev Acked-by: Wathsala Vithanage --- drivers/net/cnxk/cnxk_ethdev_sec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cnxk/cnxk_ethdev_sec.c b/drivers/net/cnxk/cnxk_ethdev_sec.c index b02dac4952..2cb2050faf 100644 --- a/drivers/net/cnxk/cnxk_ethdev_sec.c +++ b/drivers/net/cnxk/cnxk_ethdev_sec.c @@ -135,8 +135,8 @@ cnxk_nix_inl_custom_meta_pool_cb(uintptr_t pmpool, uintptr_t *mpool, const char return -EINVAL; } - rte_mempool_free(hp); plt_free(hp->pool_config); + rte_mempool_free(hp); *aura_handle = 0; *mpool = 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:06.321414215 +0800 +++ 0020-net-cnxk-fix-use-after-free-in-mempool-create.patch 2024-11-11 14:23:05.042192841 +0800 @@ -1 +1 @@ -From c024de17933128f37b1dfe38a0fae9975be1b104 Mon Sep 17 00:00:00 2001 +From c033d1168d448b3e4bb2b991abaac255331ed056 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit c024de17933128f37b1dfe38a0fae9975be1b104 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 6f5319e534..e428d2115d 100644 +index b02dac4952..2cb2050faf 100644 @@ -27 +29 @@ -@@ -136,8 +136,8 @@ cnxk_nix_inl_custom_meta_pool_cb(uintptr_t pmpool, uintptr_t *mpool, const char +@@ -135,8 +135,8 @@ cnxk_nix_inl_custom_meta_pool_cb(uintptr_t pmpool, uintptr_t *mpool, const char