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 98F9845CE3 for ; Mon, 11 Nov 2024 07:31:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D75240E1B; Mon, 11 Nov 2024 07:31:41 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2064.outbound.protection.outlook.com [40.107.243.64]) by mails.dpdk.org (Postfix) with ESMTP id 695874067A for ; Mon, 11 Nov 2024 07:31:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ScIWUPkS0+UVEsqQyHCyJCIT/daJo5ke8mgD/PJpAYtx53lQbKfQ9GgIFPL70v7MzTfISP88TfWQlewBnm/C+BkC6FVfSYwdKRVd2ZHYxTesDX2gvPOlVQBT+lF/mKJ3/5W80NQc662zOPFzLiWAF70w5JH0e5nDGZq6/EZp4mWIT6rMmBYhjmey+IcfVpZ8mlxSF7VBKxGqApnWIFfAHGxDE815n+IkNBR6tKjBMrM3I0SmEdnTt8i9cQb51g8Q7b6wCxVTJytolP0GAYxIF/c5UZlMKSskAb6YtvcbqyPJQb7wU0uUG/xkHeCXl4UULvKj6wlVCeTfH3KMhGWK3w== 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=p8io7nFBPa5Fvu9Lj96t/mO+TCt4g65IUY3i+4em0mY=; b=rJLkYtSUzOj1iO/NNxBzoJzWFdta656ZHvcH4yksJW5XmdOepOvRY8bifu/v6rb4x5PaU+25Hz1WQXtHTQ0kj5bi3R9PLcGQWWUba7FOmGyjQbPehWBnczlrmgL/iR1/fRiLtdY8Jd4XqoSkgqDGoxvJ7rASjjAIerK3Y9Rb5pT8SSIZbNrnWHuHhlT1EE5m7+BVkssXlQmXVyRO9ymRf1UFu+1+VhxWtU5JP2H1TJ+N0Xm2WYMwnP4owsJgKlAdCvrqy5oHCbu0xOQVGBkvttn3Dvuc/72yzwpRwIWH6mUGeITh0IVlT6tVTwYzV+5gtRfgGVPKQiVmnt3VNliLkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=p8io7nFBPa5Fvu9Lj96t/mO+TCt4g65IUY3i+4em0mY=; b=XPkb7ZywAkU6TQUIX1g761ADGZyO3RPqoBXm66/gBbDSpUtUORAMiqoLhXd494kokvgjKwxwx+7xuNxYnrTB476q26CYak0kOlk0/uU1EoyseAAHfNLZa/Bjn/1zj7gudTytpglG2+/QMRc3UBFkM+t3d58/3ThVqwRP5ZSDsTpvyYWXPggv6kQ4p0n3QI+pb3fRsz7zvVsvhBzbVnZdUNEi4cF9UvEAmR/8inMUXNiiu8nL5hWEagBYX5R1LTD2PaBHQNDjMw4rVoGSd1ADBomQfW5+rH41JQanEGHVoFxxmuHsWWFZzyJcykLr+W5CHw0xgGfYNMufJFV4bREZcQ== Received: from DS7PR03CA0339.namprd03.prod.outlook.com (2603:10b6:8:55::18) by SN7PR12MB6691.namprd12.prod.outlook.com (2603:10b6:806:271::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 06:31:36 +0000 Received: from DS1PEPF0001708E.namprd03.prod.outlook.com (2603:10b6:8:55:cafe::5e) by DS7PR03CA0339.outlook.office365.com (2603:10b6:8:55::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.27 via Frontend Transport; Mon, 11 Nov 2024 06:31:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS1PEPF0001708E.mail.protection.outlook.com (10.167.17.134) 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 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) 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:25 -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:22 -0800 From: Xueming Li To: Stephen Hemminger CC: , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Konstantin Ananyev , Wathsala Vithanage , dpdk stable Subject: patch 'net/nfp: fix double free in flow destroy' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:09 +0800 Message-ID: <20241111062847.216344-24-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: DS1PEPF0001708E:EE_|SN7PR12MB6691:EE_ X-MS-Office365-Filtering-Correlation-Id: b3aa1967-32ef-4ad9-144e-08dd021a7e2e 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?OG03QnVkcU1RemYrL0NDNWlmK2w2VXZqd1hCNXBnVGFVVjFjQ0VRRVZuNi9T?= =?utf-8?B?TTludW8vVW95c00zOUhZYkJQZllRZm5sTENqbGJGRW4xR0hNSFErZWlTT2Iy?= =?utf-8?B?dHhzQklGOXEvcDVuQUozQnVWa1hFRGwzc3gvMXg4aWh1bVRQeWlhMUdDZjZa?= =?utf-8?B?T0tvTE92NW1KYmVnUWQrUXpUd2UzaTVpWU9NeGo1ZzNPRTF2RWo4aE5lTmV5?= =?utf-8?B?WEVUVnZLUnR3bko3bFBESXNzMnlodVpyWVlLWkFxcDJ2TG9vSm9JcWtxN0J4?= =?utf-8?B?VURGOXhXTTJVTlZJa2xBcUxjenJpVXJDVHg5Y0U1ZUN3N3R4Sk8yV2dyZExn?= =?utf-8?B?TDVUd1dLTk1sUHozbUJzYmZBSU8wdDVhbVpWS24va2FDdjBNQ0FMWCtBaStk?= =?utf-8?B?OUZoU0o4czZGakt4TkVOM0pUUmt4eEhBWEtLbm9GMzNqMHFaQnVCQSs2aWtL?= =?utf-8?B?QzNUUVVDaHFSdEgrV2ZNM0wxN2hUSGtwYjQ0OTNOTzVWQ1I5eEpyTDQyWDg2?= =?utf-8?B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?= =?utf-8?B?SGNQOUlrYTJxdWRiM09NNEh3alJWN0YyV3ZjN1RGUWp1MTl1SDhkMk5mVXhW?= =?utf-8?B?NXc5VUFPVmY0VVFRNzR4Z0lnTXc0elZ1Um0yb2M0WlQwWnFURy96bDE3M1g0?= =?utf-8?B?VWdSZGwwRTB1eFVWUFdPdkxxYXhTb3pEL1p4a1RjUUI5SzZUR2lkcEdnWjA2?= =?utf-8?B?cmt1cXAzei9QNHBYZWVSTCs2YjVTYUpFcUhuSGJ0NEtlaitETnJIQ253bWNK?= =?utf-8?B?VXRTU1Rta0wrV2pIaGU0eUVJZHRReDRoaEJOanZ1eC92QWhCOWZnVEhjQkhz?= =?utf-8?B?dnJDQS9PcVFIbHZqa0pSRnJGcWFsMnl3M1B4WjJ6alpOM3FFSk1ieE0rVE0w?= =?utf-8?B?RDR5TmV2THpYaWMwVFNyZzhEVkJ3YXBLRW9ia0lwZnoxbU51QndxQkp0VEtv?= =?utf-8?B?OVRZcW9PVHBIYUtBN0tqRnJaa1htQ1Bkek15anR5eGdXeHc9PQ==?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.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:36.4270 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3aa1967-32ef-4ad9-144e-08dd021a7e2e 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001708E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6691 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=6560fe7e85a85543bd747377f9931aca3f325200 Thanks. Xueming Li --- >From 6560fe7e85a85543bd747377f9931aca3f325200 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Oct 2024 09:47:15 -0700 Subject: [PATCH] net/nfp: fix double free in flow destroy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 ] Calling rte_free twice on same object will corrupt the heap. Warning is: In function 'nfp_pre_tun_table_check_del', inlined from 'nfp_flow_destroy' at ../drivers/net/nfp/flower/nfp_flower_flow.c:5143:9: ../drivers/net/nfp/flower/nfp_flower_flow.c:3830:9: error: pointer 'entry' used after 'rte_free' [-Werror=use-after-free] 3830 | rte_free(entry); | ^~~~~~~~~~~~~~~ ../drivers/net/nfp/flower/nfp_flower_flow.c:3825:9: note: call to 'rte_free' here 3825 | rte_free(entry); | ^~~~~~~~~~~~~~~ Bugzilla ID: 1555 Fixes: d3c33bdf1f18 ("net/nfp: prepare for IPv4 UDP tunnel decap flow action") Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup Acked-by: Konstantin Ananyev Acked-by: Wathsala Vithanage --- drivers/net/nfp/nfp_flow.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 91ebee5db4..13f58b210e 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -3177,7 +3177,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr, goto free_entry; } - rte_free(entry); rte_free(find_entry); priv->pre_tun_cnt--; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:06.424343613 +0800 +++ 0023-net-nfp-fix-double-free-in-flow-destroy.patch 2024-11-11 14:23:05.042192841 +0800 @@ -1 +1 @@ -From fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 Mon Sep 17 00:00:00 2001 +From 6560fe7e85a85543bd747377f9931aca3f325200 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 ] @@ -26 +28,0 @@ -Cc: stable@dpdk.org @@ -33 +35 @@ - drivers/net/nfp/flower/nfp_flower_flow.c | 1 - + drivers/net/nfp/nfp_flow.c | 1 - @@ -36,5 +38,5 @@ -diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c -index 0078455658..64a0062c8b 100644 ---- a/drivers/net/nfp/flower/nfp_flower_flow.c -+++ b/drivers/net/nfp/flower/nfp_flower_flow.c -@@ -3822,7 +3822,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr, +diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c +index 91ebee5db4..13f58b210e 100644 +--- a/drivers/net/nfp/nfp_flow.c ++++ b/drivers/net/nfp/nfp_flow.c +@@ -3177,7 +3177,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr,