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 C6FD545CE3 for ; Mon, 11 Nov 2024 07:31:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEA664067A; Mon, 11 Nov 2024 07:31:43 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2056.outbound.protection.outlook.com [40.107.244.56]) by mails.dpdk.org (Postfix) with ESMTP id 3D4D94067A for ; Mon, 11 Nov 2024 07:31:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qpvgdKXmlBSGty8JFHVq5CoM9FcpaQEpw7tlZl1DPszRQ0pL1s93o/3hGKGdNgC8GoZHshBvWrh/cw07SjSLasqMTLq2Vnzvi/Qia/QIsFcaRl2S55SvUuuyN5t+xKrE665KruLt77MZGTCNgLNFGE5SpvIFTa3y6XpOdgI737yuG6B5w3n3acK/oz+Td6rhEGVsp+Eiyl2/FtZ/6TgKZZmIeZxGHGUsjDTKxTHH9OofwRV6crTke+9E84+8lMc4oDSBhFahD8TMRRt0KQI3gLOEuc3F7lbf+BdYdXvfHe/J8UYsxqWJ1chN3Giys0Unfdl12RxHPW8g95oi1kVJpA== 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=xI16cmZqHiumN7hwRWzBUFPtVlBW6BMCR1VhSysC3bI=; b=wqIxZg/lmQUidXNeS5nQhs+u3670KpxFcH2ZEqR0Vmu4VF8HM5ZHFs2lMCOYA15eCZDiw4yRv/aLXO2LnZxmNuYRsG2TgvgKaTt1RperOQ6KF1OgqTs5/keMj/qCGwoRLuRa1LbRLLZ48AwFsQbPw70B3pUoKgPqsViXkwDHUnn+N5fV9WPODZBof6KPlSm6FA5ryEqZL11GHo7ipKLK91fyJx428L89uusW47Fcg1bWVazm4RS4L4O4HJ7FvdkJFMNZczpdm3369qWkn4T7nCje1O8gsnYaiRsv1/idnkVo14bmjF62hToQjh7TSH+AuP2Q6toU+dBdsfxS3pFmKA== 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=xI16cmZqHiumN7hwRWzBUFPtVlBW6BMCR1VhSysC3bI=; b=q/iVKDaSXJYSh3xhAfdM8lNo6+C4BFV6RoF7jJvZ1ZByhT5errbZaxlNz4I8uUOrTj7UXzQLazrn20FjVxG+Ze/hyByRhBoFA+orW+2E1cH5Eni0WfmvFpaqJSKE1A2xQSzbDdK97xORUcC+gFRGArNeG4HcaNdmwyIk8PZ05Ha82sB7DaOh1Ya5NqVPCIa9jTuF03qULHQpQMIMyYApwdfQB9RbUNcgLEswJP/Q6aboXzA//m1UrcpYDCr5xFN8xIBoL+H5mBBYdOKNE+5FA5kgvd2DyvTQFO++nnpDfv3sO+f4CeV+p+lWcGSKaXANL2L3Fxo9n1uSM4VYLyzsZw== Received: from BLAPR05CA0006.namprd05.prod.outlook.com (2603:10b6:208:36e::9) by DS7PR12MB5958.namprd12.prod.outlook.com (2603:10b6:8:7d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25; Mon, 11 Nov 2024 06:31:36 +0000 Received: from BN2PEPF000055DD.namprd21.prod.outlook.com (2603:10b6:208:36e:cafe::d2) by BLAPR05CA0006.outlook.office365.com (2603:10b6:208:36e::9) 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:36 +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:36 +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:22 -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:18 -0800 From: Xueming Li To: Stephen Hemminger CC: , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Konstantin Ananyev , Wathsala Vithanage , dpdk stable Subject: patch 'net/e1000: fix use after free in filter flush' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:08 +0800 Message-ID: <20241111062847.216344-23-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_|DS7PR12MB5958:EE_ X-MS-Office365-Filtering-Correlation-Id: d8a4c944-8e4d-4900-0e7f-08dd021a7e0c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?B?SUFkWXUwckhWbjYxZTBGWXdMQ3o2MHltdWpZUm1XYi9TLytvWFpSMjIzQTZu?= =?utf-8?B?Q3VNeHljMmNtTENEdE5vdVdYSk5SeDFnM2lQYnBUV2pjYm1ydWZ1N3gxT25n?= =?utf-8?B?QW45UXMxYmwwR0VNN0dIZzdZZDViMjUyQVBJcFdEaURGOVVJc011ditJOUlG?= =?utf-8?B?clJjOTlMRU1GbGNWeTRPWlNZd2FpQ0tqaWU5NUdYRGJXRHpHd0x4WE1lUHBX?= =?utf-8?B?cXJXRUo1amtoekU5ZjhFUFBRdHdnbkRBQVM4MEY0czZla1RncDFGTWJhU3pn?= =?utf-8?B?b1djUDJEZDd1NlRvVytOYUtaY0hLbFV1Q04ySmJaYXNiaVA4VGg1NCtyc3JO?= =?utf-8?B?MXFzNEVyeHErSE5ORTBIN0d3cytKSFdrTGtKK3ZoNGVsQTRnV2Exem5ObUpx?= =?utf-8?B?RnhCSWN0WmVoN1l5RHJNcld1QVVlYjZ3am1IU2FjckVXOUZ3K0ttanc5QnNv?= =?utf-8?B?MkxJK3ltcERGNlBZUFVteGRhT01LcU15TUh2ZC9NdXQ3MXhyTFR5NVBzM0hM?= =?utf-8?B?UlNITEtJMHVi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8?B?eXBNUnlCWHYwQ2lUTHh4Q3BObVh6RXF1QmhOc3hCbnRDNWI0ZTZ2M3p1MVFy?= =?utf-8?B?bDdqZWhmTVV5dG1ya0hzLytQRmM2NkZtcmgzTHBaV3QwTkhFZGdJaHBDTjFU?= =?utf-8?B?SGl5MVZERGV1OURzT3NhQ293RHFWZkpsZVprbERwUUJQbm9uOGIxWm1qYVpw?= =?utf-8?B?MVg5aEU5dVZ3ZnhSUjhnVGJTS3ppOWQwcEZsMGY0T1dXa00ra2x0UERwWldq?= =?utf-8?B?S3QxdEZMU2pqb3JsN0ZWQ0VNYnFadTRoSDhzNTZVakhyQnpxQ0RkdVpQL2hl?= =?utf-8?B?WHNmM05QTWhxa1lmV3FXZzNsU2VZaU8wRlBaOUxzWUh3a0NtSWdrR0hoOVQ1?= =?utf-8?B?VWZINUVHOEtZTVVoRkxXcXdZS2NpVGJyQmlmbnIzNFZhSWI3UUhJZEEyM2Fs?= =?utf-8?B?Z096M2ZWL1RzdDc3NUNIN0YvbjRNdEdGWXl4ZFdTMXJyWXc9PQ==?= 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)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:31:36.1571 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8a4c944-8e4d-4900-0e7f-08dd021a7e0c 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: DS7PR12MB5958 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=cda329444d492b928d0e9f71c5e3bdfb9acc80e4 Thanks. Xueming Li --- >From cda329444d492b928d0e9f71c5e3bdfb9acc80e4 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Oct 2024 09:47:12 -0700 Subject: [PATCH] net/e1000: fix use after free in filter flush MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 58196dc411576925a1d66b0da1d11b06072a7ac2 ] The driver cleanup code was freeing the filter object then dereferencing it. Bugzilla ID: 1550 Fixes: 6a4d050e2855 ("net/igb: flush all the filter") Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup Acked-by: Konstantin Ananyev Acked-by: Wathsala Vithanage --- drivers/net/e1000/igb_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index d64a1aedd3..222e359ed9 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -3857,11 +3857,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev, filter_info->twotuple_mask &= ~(1 << filter->index); TAILQ_REMOVE(&filter_info->twotuple_list, filter, entries); - rte_free(filter); E1000_WRITE_REG(hw, E1000_TTQF(filter->index), E1000_TTQF_DISABLE_MASK); E1000_WRITE_REG(hw, E1000_IMIR(filter->index), 0); E1000_WRITE_REG(hw, E1000_IMIREXT(filter->index), 0); + rte_free(filter); return 0; } @@ -4298,7 +4298,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev, filter_info->fivetuple_mask &= ~(1 << filter->index); TAILQ_REMOVE(&filter_info->fivetuple_list, filter, entries); - rte_free(filter); E1000_WRITE_REG(hw, E1000_FTQF(filter->index), E1000_FTQF_VF_BP | E1000_FTQF_MASK); @@ -4307,6 +4306,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev, E1000_WRITE_REG(hw, E1000_SPQF(filter->index), 0); E1000_WRITE_REG(hw, E1000_IMIR(filter->index), 0); E1000_WRITE_REG(hw, E1000_IMIREXT(filter->index), 0); + rte_free(filter); return 0; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:06.389249014 +0800 +++ 0022-net-e1000-fix-use-after-free-in-filter-flush.patch 2024-11-11 14:23:05.042192841 +0800 @@ -1 +1 @@ -From 58196dc411576925a1d66b0da1d11b06072a7ac2 Mon Sep 17 00:00:00 2001 +From cda329444d492b928d0e9f71c5e3bdfb9acc80e4 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 58196dc411576925a1d66b0da1d11b06072a7ac2 ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index 1e0a483d4a..d3a9181874 100644 +index d64a1aedd3..222e359ed9 100644 @@ -28 +30 @@ -@@ -3907,11 +3907,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev, +@@ -3857,11 +3857,11 @@ igb_delete_2tuple_filter(struct rte_eth_dev *dev, @@ -41 +43 @@ -@@ -4348,7 +4348,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev, +@@ -4298,7 +4298,6 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev, @@ -49 +51 @@ -@@ -4357,6 +4356,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev, +@@ -4307,6 +4306,7 @@ igb_delete_5tuple_filter_82576(struct rte_eth_dev *dev,