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 ED15343E57 for ; Sat, 13 Apr 2024 14:54:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E527040294; Sat, 13 Apr 2024 14:54:12 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2054.outbound.protection.outlook.com [40.107.237.54]) by mails.dpdk.org (Postfix) with ESMTP id 77BFB400D6 for ; Sat, 13 Apr 2024 14:54:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P9ARD9O9nenEDieX8D36c8GPtXa4xdn7pC81/c0g987J34PoA/43ZE3gSYB35R5ALmv3X81uxKaBtkjOrYL3UfDcowOi8sgKnuM5SAFNZ3meLBAaUowkenqPr3mOEy7NFHUi1v7ENO+GZbwCemJtPBxnI5z/SX1AMzL8PFGc5SihplbHlSYN0otlbRE/THr/09wHDa/mIXxA4hIFXTZqr3f9ud1y7H5pVZAvNPZBZJixsSSSZEueLCIkTtAKnzURFrkyKJ12oo7zeUNapGesYCREviG60e85BnI4+XmKG3Cuc8P7G2KHYUIyuxbqBa3KZno2O365tylJZvilto6qLg== 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=dFR2F2qEIyMdhyWE9jevWA7YhZEFOF9TDzSBgjw+l8M=; b=B5Eaxs8LEWyIyv/R8F9TDn7vxDpegQwIlqLiKKke50UZc/eh50Y2/xKoxPmq3X8pHf6uGMlfatuxk+iuh+ukc6Dv7Di/5zUu18cv836knvOJoEsUcfEjxUatLWqZ2CpELNrzhcxgo8To3sIjqY/4+iQsaP1oPf0KWPnqhAt2bQcTKb5vrhMAYPBWMMGV+PIq9Z2qy+bdiPDkuO6y0P6oOYUP58/BcdGWHlx4nKkbZwi6Jzbt9tShsq/fnGtoGqGFUXy5YPwJyeTJBwx8TakWWkv92LwBrjwpodLBJ7evVoNsKLCRTG4QUFvilYG3rz7qaw9/FfGTfcMS3EH+FgnRtA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=dFR2F2qEIyMdhyWE9jevWA7YhZEFOF9TDzSBgjw+l8M=; b=FJ4kFWTEQFi4gVhiVzwg/q4Xb4vyCYCIUGt7NzdlWGFhuD3wrtV1a2z8LWqo7Fzpwr4HvefgaDsrHpp3i7HUEpbNtb0NPa1UMjlEPvh1RNSetBYDgKUFMQB1TJf4xphzh4AwbuTMuF/McazeCdv50NJl5SdZcWCo7dyBL1zDUhjhWcaXkU0nr0HVuvHET+u0mo/wHt4Z1F+Qv8jjsBHS5sflQitLCRzlTLiqJfXHMwDbZIg0hQu5jXIvqzTSEV7RtkidRUGm6YpBttRT8HFtY7ftqOrE6BYA9xV/+ObPyjyi2yTIWWJplBmozL0ATe1qYsLuwv8qBy7lIb17pBrhAQ== Received: from DM6PR07CA0105.namprd07.prod.outlook.com (2603:10b6:5:330::8) by PH0PR12MB8029.namprd12.prod.outlook.com (2603:10b6:510:26c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Sat, 13 Apr 2024 12:54:07 +0000 Received: from DS3PEPF0000C37F.namprd04.prod.outlook.com (2603:10b6:5:330:cafe::69) by DM6PR07CA0105.outlook.office365.com (2603:10b6:5:330::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.31 via Frontend Transport; Sat, 13 Apr 2024 12:54:07 +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 DS3PEPF0000C37F.mail.protection.outlook.com (10.167.23.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:54:06 +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.986.41; Sat, 13 Apr 2024 05:53:57 -0700 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.1258.12; Sat, 13 Apr 2024 05:53:55 -0700 From: Xueming Li To: Satheesh Paul CC: Harman Kalra , dpdk stable Subject: patch 'common/cnxk: fix possible out-of-bounds access' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:48:42 +0800 Message-ID: <20240413125005.725659-42-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-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: DS3PEPF0000C37F:EE_|PH0PR12MB8029:EE_ X-MS-Office365-Filtering-Correlation-Id: 4003bcec-9908-44f0-aa7d-08dc5bb8ce16 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tzJSGO+c3su5WQtOAXXCuhEZeCwOBcjo0oJlHcJQQKPcCVe3YQNAX/wQg9qxt4C9sL13eEEu9nbgwAzPwQnTZstLpE3HDq0U2fSwEQpUNKMcrSun1b13y7IMkz2R64DKa2/VFvOcYasxqildT33FBrYZExePEkT/aC33uYgRAjPKME0YSXtV8d7V8LbRYN8B2pRfK8DPh1zgF+7zUG5ycfSTKL/4IKc0pbTRdfZZCu/yNRBsxi7owqdNUNCwnaytzeahchW5pIx5moEQDDqqYTIkUtZwuilYD9uZxKp9tFSp8av705MLruWpQtpe2vRqUjgidUebFUVnjWXghy5Te1fwHHNm+/Lz+atujfDc0nTgNM/ICsXH3is/9nW/9+TDwK2iAD2Q69LjK82yGz+ZHRiBt1UNMdseGlhxHmQZdaxyx6lVQpINPwPM7DqGI/eWoHwlHcIdCZ7WrrSZsaWmRnZNNkz2pbLHo0RV0CLpn7JL7ZzuflMVR2ndohKW8Miiusl+oNs/8dVL4PVUwEPJRQmy/cZpCDEvKbULD9BqgmCteMUooUhF4VxHM5bp36EIUId3ghxJ5d2ov0od7JmsCLcC9R4vDehh+cfpvSD+ulVdqvnW5wwS7vEUYTQMahcTZ1nB+fyzlxQr0QzomBvh8xh6J2KZl+pcI9AX1CClZ3Iirp5AdTGqvG1aZoQQnVqsTnqZU3IWG2OOoDfpW9zDoYCqESgW8CVdzAhDJeUnrdnWTdBXhbnT6Aog2mID4Ubo 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:(13230031)(1800799015)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:54:06.8063 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4003bcec-9908-44f0-aa7d-08dc5bb8ce16 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: DS3PEPF0000C37F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8029 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/15/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=37256aa1bf8f366524d76e4ed56205c49e9b4892 Thanks. Xueming Li --- >From 37256aa1bf8f366524d76e4ed56205c49e9b4892 Mon Sep 17 00:00:00 2001 From: Satheesh Paul Date: Fri, 1 Mar 2024 09:05:34 +0530 Subject: [PATCH] common/cnxk: fix possible out-of-bounds access Cc: Xueming Li [ upstream commit 9a92937cf0c836b7f2b5e303523279ddf9473a35 ] The subtraction expression in mbox_memcpy() can wrap around causing an out-of-bounds access. Added a check on 'size' to fix this. Coverity issue: 384431, 384439 Fixes: 585bb3e538f9 ("common/cnxk: add VF support to base device class") Signed-off-by: Satheesh Paul Reviewed-by: Harman Kalra --- drivers/common/cnxk/roc_dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c index 084343c3b4..14aff233d5 100644 --- a/drivers/common/cnxk/roc_dev.c +++ b/drivers/common/cnxk/roc_dev.c @@ -502,6 +502,8 @@ pf_vf_mbox_send_up_msg(struct dev *dev, void *rec_msg) size_t size; size = PLT_ALIGN(mbox_id2size(msg->hdr.id), MBOX_MSG_ALIGN); + if (size < sizeof(struct mbox_msghdr)) + return; /* Send UP message to all VF's */ for (vf = 0; vf < vf_mbox->ndevs; vf++) { /* VF active */ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:06.358261355 +0800 +++ 0042-common-cnxk-fix-possible-out-of-bounds-access.patch 2024-04-13 20:43:04.957753984 +0800 @@ -1 +1 @@ -From 9a92937cf0c836b7f2b5e303523279ddf9473a35 Mon Sep 17 00:00:00 2001 +From 37256aa1bf8f366524d76e4ed56205c49e9b4892 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 9a92937cf0c836b7f2b5e303523279ddf9473a35 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org