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 BA4B445E41 for ; Sat, 7 Dec 2024 09:05:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEE7B40ED1; Sat, 7 Dec 2024 09:05:14 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2040.outbound.protection.outlook.com [40.107.93.40]) by mails.dpdk.org (Postfix) with ESMTP id A952B40281 for ; Sat, 7 Dec 2024 09:05:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YpropszUBZFLz1xgty1XnLFdjaJUcMQuC7nAjIWUvM9Pa2kg+EG4SE41hUFP0m4ZUQqkSBNxlXS91QY6J9WapMsHrI1bi8WVhXj3PZYJptWSB3TKyrSh7g7sVIYumb0W7PtemFstE+BIPpYehuRbWJmjLVAvBn5yvp4gJfxbUGwhYMfLkYqDnHXdQ+inymMYTrWxPCR4luAGin2a4CY6glzO7LVrSzJD0f+JkKtqmgyphGwA3ZQU55XosBeo/KpHf5ap1l8cvTlPwau4XvRsyHXfdFMEvlj9NZLKXJMquZYgzp0A0vSScDkhbE0wvZdW/tcyrGOZxikcHIWAOYzHvA== 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=5kouAzl5mk32fwyIgIaH57TRL/nLSVLpMEvHSklsOMg=; b=PDDqhHBsr0b6IfTLRLVxpLlqQeV4XZR1dRYAl2U95kGhjaPsvAkHD4ucYZiNGd9VQBOUdZS01WCH1NJIIPWMEEZx0mSW0gj1MsYNzZGIpbFZtvXQ6SO6O0LO+xX8asprixR11VQC7LCnJtWRcKy/luHIVFvO6AiuZK0pIwgRCDDRkAX2ORWFZEWv7dpmoHrg22BcXZa2UrfCxU+6ZNyXiRrReaHj5rcBsEYqhsJdm69zAE0+5v56NArlw07JheuKZ1//15QG3ea8UHMA6OvOM4cTOSvmiG2Xp+2UgOai8MXvl/qDTTwvqehfZUbFU3l8mZzWV/teXlacO9TZzudYAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=marvell.com 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=5kouAzl5mk32fwyIgIaH57TRL/nLSVLpMEvHSklsOMg=; b=fOjtnQXRcXgrBdnY6wIxt66LUZMLymZx2DRflA9nHdsqG1bfzXCLOQkzAA4d55My0XCugDcLIfoeXVaZphAZFGjYNnchBMZV31Z6Z/+qAfG41/3G9a0q8UCLxMObB4FFFcHi3YbePxlr39CFasa0brJX8+oRDofv0zsljE3/QjKo7YETt4hJh/EUlcdj7AzIwcEBr7CShnsQ4rY7LwFG0LMnUWXiMITudi5f7bT9qbyYNE4CFRBiJDyn2W6ijcaXK1Fi4UMKZ8sexdlT6iwLR8/Fo9et+kkXtQUlEM2dlDFOrUWoG8XqzVamR+DaF5mZ8AJIqboIj8xAf10UTp0HeA== Received: from DS0PR17CA0019.namprd17.prod.outlook.com (2603:10b6:8:191::8) by SA1PR12MB6725.namprd12.prod.outlook.com (2603:10b6:806:254::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.23; Sat, 7 Dec 2024 08:05:08 +0000 Received: from CY4PEPF0000E9D7.namprd05.prod.outlook.com (2603:10b6:8:191:cafe::ea) by DS0PR17CA0019.outlook.office365.com (2603:10b6:8:191::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.11 via Frontend Transport; Sat, 7 Dec 2024 08:05:08 +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 CY4PEPF0000E9D7.mail.protection.outlook.com (10.167.241.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.7 via Frontend Transport; Sat, 7 Dec 2024 08:05:07 +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; Sat, 7 Dec 2024 00:05:01 -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; Sat, 7 Dec 2024 00:04:59 -0800 From: Xueming Li To: Hanumanth Pothula CC: Xueming Li , Ali Alnubani , "dpdk stable" Subject: patch 'event/octeontx: fix possible integer overflow' has been queued to stable release 23.11.3 Date: Sat, 7 Dec 2024 16:00:01 +0800 Message-ID: <20241207080055.488538-44-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241207080055.488538-1-xuemingl@nvidia.com> References: <20241111062847.216344-122-xuemingl@nvidia.com> <20241207080055.488538-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D7:EE_|SA1PR12MB6725:EE_ X-MS-Office365-Filtering-Correlation-Id: 64d55a9f-7bf0-4220-a0a2-08dd1695dd92 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?1MgsEgpTCsgmRlheNxxSnIaircnQA8inj4mxDgA9jJ6Rm5c5gZjVX4zmNQch?= =?us-ascii?Q?Ev+wgOQCrBGzvh7uKfFvbu3zrONy1OfzfNYuQXIJKeF/ylAzbMxD2xSKbkTJ?= =?us-ascii?Q?Hd66/pwo/IttEqwGYXQRUC3cW9roW+UT7zF7e6x0hS/RWGu5MnPYdeFmRJrf?= =?us-ascii?Q?zkvWnuHhNAcGxzKS01TBDCX3nC3D8BwGewvenStb8WkRCpwN1QBU0vsBJUx+?= =?us-ascii?Q?9Ev25/TMuFF76iJKBm5+pvWHO6N71ICLVk/GL9gBvNnRRLIFzO60AYHfWJAV?= =?us-ascii?Q?N70+4cMgbF7a/dcPWM1afAQ9GVf/2f5CXqLeEND+tWTFwEKPXyCMmclvMLQR?= =?us-ascii?Q?E88CAAztWQynbDAFl2FP03IkoFTssHzPdGwNmRL7FN5uQCaXpj4GDsR/dBBP?= =?us-ascii?Q?kOnaK0wHx002tVDvwOyVz8IOHPbMx3ixh77D6ApXarDMOR/CpOy0m+DpA6Ex?= =?us-ascii?Q?O9EmxHZ/d4HcVa0ipb0JFg+UUZOp8VQdxpWFZzUbSmJeNecvyOV1rA449snN?= =?us-ascii?Q?iL8Yv7tt+Bd8xQuR4GN/5+R1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?lP8h5eI1Uhzu667Km49cyDmdlBU0PmkD?= 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)(1800799024)(376014)(82310400026)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2024 08:05:07.9009 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 64d55a9f-7bf0-4220-a0a2-08dd1695dd92 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: CY4PEPF0000E9D7.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6725 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 12/10/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=97660f027b345b63678cf4b6fc0c5b3bdce6a19d Thanks. Xueming Li --- >From 97660f027b345b63678cf4b6fc0c5b3bdce6a19d Mon Sep 17 00:00:00 2001 From: Hanumanth Pothula Date: Fri, 25 Oct 2024 16:28:02 +0530 Subject: [PATCH] event/octeontx: fix possible integer overflow Cc: Xueming Li [ upstream commit 3e86eee028c69b98144e2c62ec48091467e790be ] The last argument passed to ssovf_parsekv() is an unsigned char*, but it is accessed as an integer. This can lead to an integer overflow. Hence, make ensure the argument is accessed as a char and for better error handling use strtol instead of atoi. Bugzilla ID: 1512 Fixes: 3516327e00fd ("event/octeontx: add selftest to device arguments") Signed-off-by: Hanumanth Pothula Tested-by: Ali Alnubani --- drivers/event/octeontx/ssovf_evdev.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index a16f24e088..c0129328ef 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -714,10 +714,20 @@ ssovf_close(struct rte_eventdev *dev) } static int -ssovf_parsekv(const char *key __rte_unused, const char *value, void *opaque) +ssovf_parsekv(const char *key, const char *value, void *opaque) { - int *flag = opaque; - *flag = !!atoi(value); + uint8_t *flag = opaque; + uint64_t v; + char *end; + + errno = 0; + v = strtoul(value, &end, 0); + if ((errno != 0) || (value == end) || *end != '\0' || v > 1) { + ssovf_log_err("invalid %s value %s", key, value); + return -EINVAL; + } + + *flag = !!v; return 0; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-12-06 23:26:45.538428610 +0800 +++ 0043-event-octeontx-fix-possible-integer-overflow.patch 2024-12-06 23:26:43.943044828 +0800 @@ -1 +1 @@ -From 3e86eee028c69b98144e2c62ec48091467e790be Mon Sep 17 00:00:00 2001 +From 97660f027b345b63678cf4b6fc0c5b3bdce6a19d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 3e86eee028c69b98144e2c62ec48091467e790be ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 3a933b1db7..957fcab04e 100644 +index a16f24e088..c0129328ef 100644 @@ -27 +29 @@ -@@ -717,10 +717,20 @@ ssovf_close(struct rte_eventdev *dev) +@@ -714,10 +714,20 @@ ssovf_close(struct rte_eventdev *dev)