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 313CDA034F for ; Wed, 10 Nov 2021 07:49:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B14040142; Wed, 10 Nov 2021 07:49:28 +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 D1E6140142 for ; Wed, 10 Nov 2021 07:49:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KjQi9ZIYd5MZTCZh1MO9RCL8PfgbF27XOsPbEvXEo3IwiK7JfUbjcrnbF9S698d3Uq/NnhjXxDU+FibNhvwyaL9IFWf0BFN40pzZIS2L2XX90E5Kxcf4F2hjag1dLYNPqW+C2/UwXyin8rDysysKezCy6OYX8qD1L7o1zKT3xYdhpbmZkBA1o+fnjhb23szkC3zVvFozOGGpUbuShjAlMgivBbpuFRKea3MIUfEQCAv0PkGdZI943fMpJvUu94KJ7LgczSYhxsCS53gt7tV9VsQgEOZaBQTimYElSkB9XCEWJkj5a09zBZKOzsgNOuADeORz+AkOTH+OO5RNNLPw/A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WAKqzXsyQSeY4jNY4CKhVWP72RoHuGRKORp23Q95B6k=; b=VwxjV0NUPTnWTurFzQCbwtB5AyB4enh7Xb2krcAHufDLhQFzqF6ElJ+IP4xOFzGiOSgKnd3nnaVePkhNBuz9i0FY/S4x+RZmZ9dXNxHfHpHc4at1bIebYqSxWgk0r7evJDTLHM/9aqs/zytVz7JY8z15GZMcxB3tjhGLl7Kd4F/xl4pzfOobi5eV6qY+jTnay0jPIeEBIEKr3NGd8YjuNF6FbQaD6N09IEddMDwglDtro2a1coAmSBy7E7fso2Rhtc3wrIe+coro+TMibmeULw+2fjc7P6krgEsNGxaoCK+A62lNzelRckSJ+SZ8psRKOWvrE9PwSC5vMNIwQr7/bg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none 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=WAKqzXsyQSeY4jNY4CKhVWP72RoHuGRKORp23Q95B6k=; b=ePlrUFavoufT8iZ7WKycgygRV+8iXUtii89VsmYOqzJpX9AmCbIFLVCTm7Zn2jDVCpPlDNGUXB9+oebHqgk/OB1iX5OZZKnvt1FCFi6aau05Myrr8pL+DECj41jZb5LnTZd7pFNbnzZMfPyJ0SDLLCQnAGkX5CKw8EQKJTKCQuvZzwYf4b5LO5/hlCMt5VT7Gtm6Xlm1/88/g5MD75M/GSd2Sw4h9ch+cW5ygCCCHueNKNLtU0he87uvuzYeysleSAx7XRUe1nua0eAwP2IRMeHqvE3KJN/V6yIVop/cOJbaSTgoV1uwL0BFBm1RC/X8fvGvQTa7M35UcXSn6GKYTQ== Received: from BN8PR12CA0001.namprd12.prod.outlook.com (2603:10b6:408:60::14) by DM6PR12MB4529.namprd12.prod.outlook.com (2603:10b6:5:2ab::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 06:49:25 +0000 Received: from BN8NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:408:60:cafe::35) by BN8PR12CA0001.outlook.office365.com (2603:10b6:408:60::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:49:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT034.mail.protection.outlook.com (10.13.176.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:49:24 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:49:22 +0000 From: Xueming Li To: Viacheslav Ovsiienko CC: Luca Boccassi , Ori Kam , dpdk stable Date: Wed, 10 Nov 2021 14:30:37 +0800 Message-ID: <20211110063216.2744012-154-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f88112a3-15e9-4410-f24b-08d9a4163bf1 X-MS-TrafficTypeDiagnostic: DM6PR12MB4529: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ok+uX3b+h68olQCMFSMJS4bBVaTj7c6uiLE/4UkUjNAMCogoP7gL6EM763tSa42r2hktFyRRcsf2PbKGRJGQC1TGrPdjEZHTn7FBn2W/rZTFTmnRkmjB5lEm3UGPW/5XpKFJ9EJniCBlf31WFFChUNRSSwP7aE7NK660T0tWVi/m3HJcki/81lvATrq0Y5gJcPukVI7GP54eldujHs5UftMe/+O3bwEshPe3EYzGuZAHlfEhM1ZmyCOWPnX0zzYkq5jHhlPulROaVUv+2zrMRvBZtsWrBQulRZF9L46ZqPCOSDjc6zX2gODWPm7ksTwpBrncZ1pnHmhyq8rT9BxAS1wFDpRFG8KT/OQzBKxnkwMoKtPUfKxarUUchoIxAUznZITZ1Tyu6hVvxlYV4PTJhQMjA169TfBO8BQPUHf97Bw1MZoMR9PjW76ycMbAUv+XUI2pDp1vJs2QjUjLMhAb1YjJU/YMGlnTtjaBlJqi7RRfX6NRNgQ3xhIRZ90d+yiY6oZ48mTHmpwv7cS/n22RSrf7N2Q9aTq8GZhE4EhMgeROSHuUiNMyTz8TWhzsvzUbESRFrh2vm52b/m55bHtntwYBiWnXeNCJtQ0kJ08pZsJZOpRrPNyLnfr//EjxLkXIuEg7bUytm7yLM0xqODxWH5iqTHKUQ/4FGT9SYXLIOfvjqZvmRJebyLCUfFf13/ajZaWIfOCpSz1o+O+l5M3DuN+cVvMG23WsjkOks2JrxMIOnew5/Il8wfPRpTZXIXZODFJBUGO1I0BAWjiat+IRJLsGtWnUMQOjenlXfdJxRF52yoTYk+9LwI/ih2ziNg7FkpVY/0lQ+3shegYXIVoS/g== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(336012)(26005)(6666004)(36860700001)(6862004)(16526019)(186003)(70586007)(5660300002)(6636002)(47076005)(7696005)(53546011)(36756003)(1076003)(86362001)(6286002)(966005)(7636003)(2616005)(2906002)(54906003)(82310400003)(316002)(36906005)(4326008)(70206006)(37006003)(4001150100001)(426003)(83380400001)(8936002)(55016002)(8676002)(356005)(508600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:49:24.9884 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f88112a3-15e9-4410-f24b-08d9a4163bf1 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4529 Subject: [dpdk-stable] patch 'app/testpmd: fix hex string parser in flow commands' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 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/12/21. 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://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/c77bb52ed48e27e6846ab435d121ba32ac2364e9 Thanks. Xueming Li --- >From c77bb52ed48e27e6846ab435d121ba32ac2364e9 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Wed, 13 Oct 2021 21:45:15 +0300 Subject: [PATCH] app/testpmd: fix hex string parser in flow commands Cc: Xueming Li [ upstream commit a2b97fb7f5b11dcf5e810e13a0da1a0f111975e6 ] The hexadecimal string parser does not check the target field buffer size, buffer overflow happens and might cause the application failure (segmentation fault is observed usually). Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API") Signed-off-by: Viacheslav Ovsiienko Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index c67ac71505..bbf62be5ae 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -6479,10 +6479,13 @@ parse_hex(struct context *ctx, const struct token *token, hexlen -= 2; } if (hexlen > length) - return -1; + goto error; ret = parse_hex_string(str, hex_tmp, &hexlen); if (ret < 0) goto error; + /* Check the converted binary fits into data buffer. */ + if (hexlen > size) + goto error; /* Let parse_int() fill length information first. */ ret = snprintf(tmp, sizeof(tmp), "%u", hexlen); if (ret < 0) -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:08.737101866 +0800 +++ 0153-app-testpmd-fix-hex-string-parser-in-flow-commands.patch 2021-11-10 14:17:01.947412130 +0800 @@ -1 +1 @@ -From a2b97fb7f5b11dcf5e810e13a0da1a0f111975e6 Mon Sep 17 00:00:00 2001 +From c77bb52ed48e27e6846ab435d121ba32ac2364e9 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit a2b97fb7f5b11dcf5e810e13a0da1a0f111975e6 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 6d9e3d5c42..a90822b660 100644 +index c67ac71505..bbf62be5ae 100644 @@ -24 +26 @@ -@@ -7381,10 +7381,13 @@ parse_hex(struct context *ctx, const struct token *token, +@@ -6479,10 +6479,13 @@ parse_hex(struct context *ctx, const struct token *token,