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 ACC4B45E41 for ; Sat, 7 Dec 2024 09:07:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E4B340281; Sat, 7 Dec 2024 09:07:47 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2089.outbound.protection.outlook.com [40.107.92.89]) by mails.dpdk.org (Postfix) with ESMTP id 02EA240281 for ; Sat, 7 Dec 2024 09:07:45 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rCH+WN1V8zkAjLILaQr+JR5BCoWo6o8ipQAL2oBjMck2ihlLN7B8AGTcdZl6LbcdLZuJuweW5/1tT0ShuQydnZCRj6oaBTZPRDjs218qBaq/fcSu59g8QWUUyPtOniam5HiTYEhzJPEpFN6XsrKU9kF3FUtIBdCL6sEBNg45I3nGjp4TQlj4SXTmZcLC/iNe4eh5qr5eU4lJ15ee0GxKx0r0PN5OarjK7nUCgPrP85ih4NFY4MfCkUHTcswwqhF0gtIR2Ji9yc4uGHJ3jtZn34k21Kpr2+sHK1NRfJFbun52rNB1bpM+fPnR2Dknf28HUAmX4/U/y+6MwULEju1/hQ== 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=qi2eIdY5WKteEFwKU5t2iOu35AV3Ygq+kg0JPwKBVo4=; b=UUmysPZqZWWsREVsXXVYAiVEBJFoihHigE5375yFjGO39z0snm1oMDP/ZMsJP4GLtr9vdPXW0z6XlImqE7BB8yDS8VFwluvNphjdvLg8XlL44FZnwc0aBBAK2/F8xGMcPDjpaJjj190area0GveRdJDuPEo3GDrKGV9At6FkWJFVRlbrMuTxJSMaBXGSPQDzRSqF4bJGdvGOXSVWdgqLpgPxrcOo95LB7D5FWpIfzSgo9v8EVL12nPypDWLL3ybddGNRCpFCZzJ4BtOc7oBxjehaoFIQ+J/8iuT6KdcdFormzAlw/DJBRHbir+/2Bjttf6J6ezyhQ2WO4w9+hNAktA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.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=qi2eIdY5WKteEFwKU5t2iOu35AV3Ygq+kg0JPwKBVo4=; b=UM4pM8YeJmW/0HUCaXmJYphX8PO84P2P5orVovziXFSO6VRV+7pP7n05FPxRD8ULhyQoY7wXdQoFkEwEwaSHcupGgBRh16GUiy/ocQcjMEc1wystmHX+QjLUIKDlqeuJYJ4RZ5Ut6NG7i/3bB0k6mocKK/c20LTRga9oBoJPeM8i2gAF5dV/kMuvqWGMHoU40HCL1raWreEIOvhn+1N40W19cOLrd9ObIDL2DEC+0mp7oGbjid+JGiZol/JPFZ5nZze/dC2yEZNFX58Cdoxw5T1R74DI9Qm/C9QPxch8LVjI/mwyvTCsy0Vn8E7nIeDSsOizNNU8mvO5JBUSRx03uw== Received: from BN9P220CA0010.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:13e::15) by PH7PR12MB7331.namprd12.prod.outlook.com (2603:10b6:510:20e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.25; Sat, 7 Dec 2024 08:07:40 +0000 Received: from BL02EPF00021F6B.namprd02.prod.outlook.com (2603:10b6:408:13e:cafe::46) by BN9P220CA0010.outlook.office365.com (2603:10b6:408:13e::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.12 via Frontend Transport; Sat, 7 Dec 2024 08:07:40 +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 BL02EPF00021F6B.mail.protection.outlook.com (10.167.249.7) 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:07:40 +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:07:23 -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:07:22 -0800 From: Xueming Li To: Bruce Richardson CC: Xueming Li , Jerin Jacob , "dpdk stable" Subject: patch 'eventdev: fix possible array underflow/overflow' has been queued to stable release 23.11.3 Date: Sat, 7 Dec 2024 16:00:23 +0800 Message-ID: <20241207080055.488538-66-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: BL02EPF00021F6B:EE_|PH7PR12MB7331:EE_ X-MS-Office365-Filtering-Correlation-Id: bed21c91-f92d-425d-e91e-08dd1696385b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?C3ZKapN56QZG4KyRofI3Ad9D8y4EIN+Vcjfmbh4lAjfRqs9bVEDC8/17wFfi?= =?us-ascii?Q?5Q+3e3IQb5Vult54M1xYGVRVanOQKBn+E1zuTYjqAYfjIvSRQqW37zYI7Wrh?= =?us-ascii?Q?3dIJmiIpozeq31lBZm6VUzF620rEjy5/7Xao033M/HfZEKDEXWUc8WHHk7HX?= =?us-ascii?Q?L++XPkFQHKO5A6cjgt8skEKT1PQ/bfP+dsLo7MCIuYXGxxzAOLQWbDO5XBTf?= =?us-ascii?Q?WIgTiomvZydt3Hl5AB9/cjmdRoKRAvHIuh5RQtrXB6fFzVZ7zIXWO9SqgRMq?= =?us-ascii?Q?clCKf36I4G+XUEMfnNGTTF0xs9TGMzOuNdXAA574EVZerYT7lOWskD7mKKV7?= =?us-ascii?Q?LEcutf8YmpOf/P23js3kkbESVEJ7ywcx2aKKloLY48YHhisV6YVug4jsK6gx?= =?us-ascii?Q?+WOySxAlLneOkrXlBGI4/g+ryxbr06FyNFnm9SHfrtGLiAkETj3GmHPOe+wE?= =?us-ascii?Q?hTpERvbxKh6EWkXNxGQ6NfOgTkFQbJ0fAvzF+fTn+3hsMp0y4yS33ZYyMYyp?= =?us-ascii?Q?3sUJ3zq+Mc4UQYl62b6/H6qQaxjUV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VInMYpIeC6hn0y2g6UDwct6?= 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)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2024 08:07:40.1056 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bed21c91-f92d-425d-e91e-08dd1696385b 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: BL02EPF00021F6B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7331 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=717465a84d31115f76a9ca33fb09d0bcceff6255 Thanks. Xueming Li --- >From 717465a84d31115f76a9ca33fb09d0bcceff6255 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Thu, 14 Nov 2024 11:55:38 +0000 Subject: [PATCH] eventdev: fix possible array underflow/overflow Cc: Xueming Li [ upstream commit 952b24bd0475450e548d4aafae7d8cf48258402b ] If the number of interrupts is zero, then indexing an array by "nb_rx_intr - 1" will cause an out-of-bounds write Fix this by putting in a check that nb_rx_intr > 0 before doing the array write. Coverity issue: 448870 Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter") Signed-off-by: Bruce Richardson Acked-by: Jerin Jacob --- lib/eventdev/rte_event_eth_rx_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c index 1b83a55b5c..bdcc3e3539 100644 --- a/lib/eventdev/rte_event_eth_rx_adapter.c +++ b/lib/eventdev/rte_event_eth_rx_adapter.c @@ -2299,7 +2299,7 @@ rxa_sw_add(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id, for (i = 0; i < dev_info->dev->data->nb_rx_queues; i++) dev_info->intr_queue[i] = i; } else { - if (!rxa_intr_queue(dev_info, rx_queue_id)) + if (!rxa_intr_queue(dev_info, rx_queue_id) && nb_rx_intr > 0) dev_info->intr_queue[nb_rx_intr - 1] = rx_queue_id; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-12-06 23:26:46.230994302 +0800 +++ 0065-eventdev-fix-possible-array-underflow-overflow.patch 2024-12-06 23:26:43.983044827 +0800 @@ -1 +1 @@ -From 952b24bd0475450e548d4aafae7d8cf48258402b Mon Sep 17 00:00:00 2001 +From 717465a84d31115f76a9ca33fb09d0bcceff6255 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 952b24bd0475450e548d4aafae7d8cf48258402b ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 3ee20d95f3..39674c4604 100644 +index 1b83a55b5c..bdcc3e3539 100644