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 3818C45CE3 for ; Mon, 11 Nov 2024 07:31:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 29BE44067A; Mon, 11 Nov 2024 07:31:36 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2086.outbound.protection.outlook.com [40.107.243.86]) by mails.dpdk.org (Postfix) with ESMTP id C29A74067A for ; Mon, 11 Nov 2024 07:31:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=B98VuPff5Dq6Zay9LyLPHt2CmlsQvJhb7shJbzhU8Y5bjS/SeAyOUWUza9p/ecYnfGwWMu1ZqJ8YyYzT18YiOs+VsJ93MEXpwt+6HM13MmMwssnqohBJJLw32s0s/1ot/WtP1OOfwLl4k8t3Vaf5+HbUdGmdRkgW/bcAtSc83a+/63ircYM8gNDhJq2T0Wm5fWRFa2gaRHCQ9JkVtms4SR2gNq7f5zqYvrEUHPsqPZldsRfN8hq8mML3rbrNWRup+R0cD3NiiOFylJaWW3teUTpI16zKFDt7o7jJtmw5nXHbhB632/VTQWqapTwZFV4T4rCNzDJMP0KplMnnRHwpRw== 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=E5AA2SD8jdN90AwPxFc8AtztvETwzHLO0Xmm+GnLB+c=; b=RXNT8BCNW8jHdSZsi2p7q49qEO0GN3e8ZzL+p2fQOMdqdbl/0EQ48pIyM+JKCCLxiyT8quIceANsJ0Qu0IQ868O/DuyWrLUaOCvItCOIk0njdHwxOvcc6+4QNQaRy0L+VvwiH3Y9aC9mHzd/a/3ta9HX3w2rmRFwkC0CpdOMAAPISuPbxDlJiSoMd5Y085RZQEHhQn2oCMEYpfc1YfICyA6Z00PYzn1PPXUNPHSPMgiwXwi7PJ0sx2y2yWk+iuv6kJMbD8Yg4I9SKJnkvbLGX146pae0DmZDGV0Px+uUmscfzPs504qsHzMiXDcqglvwysMg9S6Q0z/UDcYDxTH8wg== 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=E5AA2SD8jdN90AwPxFc8AtztvETwzHLO0Xmm+GnLB+c=; b=YjBEljRyEkbg6ycldD1c1jCe7E4+6pYe+Rj2iqH6LxmLOpDNUqhEyGePmPeZmEhKVIZdQjSiDPMSTLv+Ta0D3NiSVPQsB0S0Acz++MSC4qa1SfPg43hN3M8O8c8esFj9hq88wPs1+0dSsJrIjasRKYUoTU+uKQ4hRfjYQAtGKtsjwUPz20sQSQL9VJoYo2kVQ03tpKy4nTmXUKjvvtEJNlKY5E82YC0yaiEzXuGVu/BZ3I+IQ0czC2hYr6Ik4WZrameH8ipq4/rJZIXXZ15zjjsS+XjwkWJpnQf1GD6AiAWeQoFTIBcq00XImQtDZ/qzw40E+pry7ojaLIXDa6e7pw== Received: from BN9PR03CA0333.namprd03.prod.outlook.com (2603:10b6:408:f6::8) by MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) 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:32 +0000 Received: from BN2PEPF000055DB.namprd21.prod.outlook.com (2603:10b6:408:f6:cafe::bf) by BN9PR03CA0333.outlook.office365.com (2603:10b6:408:f6::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.26 via Frontend Transport; Mon, 11 Nov 2024 06:31:32 +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 BN2PEPF000055DB.mail.protection.outlook.com (10.167.245.5) 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:31 +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:18 -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:15 -0800 From: Xueming Li To: Stephen Hemminger CC: , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Konstantin Ananyev , Wathsala Vithanage , dpdk stable Subject: patch 'net/cpfl: fix invalid free in JSON parser' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:07 +0800 Message-ID: <20241111062847.216344-22-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: BN2PEPF000055DB:EE_|MN2PR12MB4192:EE_ X-MS-Office365-Filtering-Correlation-Id: 11ae5190-5747-4226-6306-08dd021a7b78 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?B?MUlOaTZydWd4Vm1pcFNOWGtwS0pmUi9sWnhOMHAwL3I2MDZaUE9wVG04c3lr?= =?utf-8?B?d0FMRVIvK2ExOTBVMk9HOVBGWGltNjdCTWZPV2ZzelBTdGdnWkdFenpQQjRL?= =?utf-8?B?MC8rSjRuOEIxS2lzMEs4NUYyME4yUXY4RTQwU090dFEydHMxaXEyYXJyQzFa?= =?utf-8?B?V3NpRFJQUE0yemlXeml1MzhtcG9ka2xMdFhxZXltRnRReHVydFNCTktjMmo4?= =?utf-8?B?K0laWkt6OXFYeUl6VmMrVitUQVNvVDRySERSYm9HQlpiaCtzYnAyTCs2eFdi?= =?utf-8?B?bVhxSENhZmxKcDdwRFZyUmQzREJ6QnRtTVhTby93dUpvVDlrNWxXcnNOL1pq?= =?utf-8?B?V2FsVW5NVEFZQTNMWUV5eUJIK1VMK1JpREhFOWtubmUvS1ZkaFcvRGRIUDdo?= =?utf-8?B?Wm5IaFdFd0FYcmRVVVQ4R3JiRng5Ri9rZEVzYVV2cnBIN25DL2ZaMWJIM2pH?= =?utf-8?B?dG1KWXhGNEVaT1FDVGZqM1JqcVYvWWUvdXhwc2xFMWpjbHpkTHl4c3ZVQ0hN?=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G96S3VPSUJib2JJUHozSlRQ?= =?utf-8?B?WDFaRVk0b1k3SURCY3JXQ1RXOXJ0bTJ3eE92VVdLdTJzcUJ4eFFXRzVsdS9m?= =?utf-8?B?UGRoYnpCejBkMVBjT01yZHhuVXFZQjhzY29LZDVRbFZKRUVvTENVSGdaejUz?= =?utf-8?B?YzZVOHdwOUxkVFVsRFFmTWhhejlseG9HRTRIajl6R212cE5NQ1hkeXJtZkVp?= =?utf-8?B?RmJNYkhWdGFNRnJEM2VWSlBDWXIzVlU1dWJwZ1V0TzQzNkFTdHl5QmV2d2kz?= =?utf-8?B?NitmVlNPRys0SkdkWU9KeVR0YnNlOEVFbWFYeXd2Zmd4U2JCNFJKSERPMy96?= =?utf-8?B?TGd5VWQ5RXNJaDNqVFpINXNxM1g1NnlhVzA3WDg2Z3BhdWswTGhaQXlUdzZY?= =?utf-8?B?R0tncS9NK3YwSDVPZ085Z2swbTdlSEhlWW9SMS9QTUVrWjArSFpwU2ZZVmJv?= =?utf-8?B?SDlZUm5nLy9sc1Rpc0pmR29ZY0ZpbEJzTFFJaTczWGZuR3c9PQ==?= 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)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:31:31.8495 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 11ae5190-5747-4226-6306-08dd021a7b78 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: BN2PEPF000055DB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4192 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=55f413c5ad5c01b4149b239c2342c833d52f77c5 Thanks. Xueming Li --- >From 55f413c5ad5c01b4149b239c2342c833d52f77c5 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Oct 2024 09:47:14 -0700 Subject: [PATCH] net/cpfl: fix invalid free in JSON parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 1c20cf5be5c8b3e09673a44da2ce532ec0f35236 ] With proper annotation, GCC discovers that this driver is calling rte_free() on an object that was not allocated (it is part of array in another object). In function ‘cpfl_flow_js_mr_layout’, inlined from ‘cpfl_flow_js_mr_action’ at ../drivers/net/cpfl/cpfl_flow_parser.c:848:9, inlined from ‘cpfl_flow_js_mod_rule’ at ../drivers/net/cpfl/cpfl_flow_parser.c:908:9, inlined from ‘cpfl_parser_init’ at ../drivers/net/cpfl/cpfl_flow_parser.c:932:8, inlined from ‘cpfl_parser_create’ at ../drivers/net/cpfl/cpfl_flow_parser.c:959:8: ../drivers/net/cpfl/cpfl_flow_parser.c:740:9: warning: ‘rte_free’ called on pointer ‘*parser.modifications’ with nonzero offset [28, 15479062120396] [-Wfree-nonheap-object] 740 | rte_free(js_mod->layout); | ^~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 6cc97c9971d7 ("net/cpfl: build action mapping rules from JSON") Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup Acked-by: Konstantin Ananyev Acked-by: Wathsala Vithanage --- drivers/net/cpfl/cpfl_flow_parser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/cpfl/cpfl_flow_parser.c b/drivers/net/cpfl/cpfl_flow_parser.c index 011229a470..303e979015 100644 --- a/drivers/net/cpfl/cpfl_flow_parser.c +++ b/drivers/net/cpfl/cpfl_flow_parser.c @@ -737,7 +737,6 @@ cpfl_flow_js_mr_layout(json_t *ob_layouts, struct cpfl_flow_js_mr_action_mod *js return 0; err: - rte_free(js_mod->layout); return -EINVAL; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:06.355857615 +0800 +++ 0021-net-cpfl-fix-invalid-free-in-JSON-parser.patch 2024-11-11 14:23:05.042192841 +0800 @@ -1 +1 @@ -From 1c20cf5be5c8b3e09673a44da2ce532ec0f35236 Mon Sep 17 00:00:00 2001 +From 55f413c5ad5c01b4149b239c2342c833d52f77c5 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 1c20cf5be5c8b3e09673a44da2ce532ec0f35236 ] @@ -29 +31,0 @@ -Cc: stable@dpdk.org