From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.132]) by mx.groups.io with SMTP id smtpd.web10.42406.1683174043788836756 for ; Wed, 03 May 2023 21:20:44 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=B3//jJUa; spf=pass (domain: os.amperecomputing.com, ip: 40.107.94.132, mailfrom: minhnguyen1@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g4sVG7kVx9coiN00evKn4L0Kl+6sPXLzvTJbQZNZcuoJApVMH2WE25pQjh9ID8xjxhrL2DrUXEcP7a8+sLikLkXYZ2IEnLONqsVGYLTSI4FalbTxi1pZYXMPoHeKZ5IeGjJcbimhHrW+bTRI5sBpAy5bJ5DOI/7ZD7U1xXS3l276VfmtPyAlYTr1YjolXB3NlTMMszQKY4vFMG/zSYB2bhV00TK1nMDG1Y9TeGao347FNisSuWX/F0lbYFe4Ty/OS92yBCK2YeM8EGOjRAp+E2DKzXXHouCHA3bbR7UG+HfeP2mGlXTnQ1fi0fYr+2bWW4/Mw3Q3/5PP6OVkfpMtIg== 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=35uvj5Ksz/2/Lk61WIfbLpSL01av76B96OAsKjjzYps=; b=obOGJOLbbxn5rOpC58ni/bTch498WNO5JYpx+h5JUwOflvV5qnjenZFeuTQ8Efrsltww45QGQO+Qh6VrkjGsKxWEskcj7i1SVzNh4PUbt47xn6PSA92BnkroNNiS1DPj0yPqcnN6AGS/2TG9Y43TwhQJDbIof6jvaIoDGVa8/9pckgtq7lBMjHkOU2/9cuLCmrr5MnXXtd8yOqe6k3hp2y6vscYaLyS/pGPo/6h4+5/4LUbF8EApBUCQ3YlRNGdt4D9g2Y2lhoSSzU2BORsetsBa/hl7659THt5n3BawdP6bARFVOYNWcSZNiXxQfKLXbWs1LJqD51C7WxlKCTUSqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=35uvj5Ksz/2/Lk61WIfbLpSL01av76B96OAsKjjzYps=; b=B3//jJUaw3iCQaPj4ePyuz2yiLS6S9skclLrNXfY6jUATf2+L15oBiSzQfDrHCl2171qHGRl6uydli79DWGqWnMQarIM0gTGAOQhpsRyxJLE4rcviRnpHw0K2LYTi8KywwlpivymghR30MfhQ8iMyXdwmX1Vi7CIaipptE91nQQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB8048.prod.exchangelabs.com (2603:10b6:510:280::7) by SN7PR01MB8044.prod.exchangelabs.com (2603:10b6:806:347::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.31; Thu, 4 May 2023 04:20:41 +0000 Received: from PH0PR01MB8048.prod.exchangelabs.com ([fe80::bbdb:b58c:140e:c4e1]) by PH0PR01MB8048.prod.exchangelabs.com ([fe80::bbdb:b58c:140e:c4e1%7]) with mapi id 15.20.6363.026; Thu, 4 May 2023 04:20:41 +0000 From: Minh Nguyen To: devel@edk2.groups.io CC: patches@amperecomputing.com, abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, nhi@os.amperecomputing.com, Vu Nguyen , Minh Nguyen , Nick Ramirez Subject: [PATCH V2 1/5] RedfishPkg: Correct variable type to prevent memory corruption Date: Thu, 4 May 2023 11:19:41 +0700 Message-ID: <20230504041945.1377457-2-minhnguyen1@os.amperecomputing.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230504041945.1377457-1-minhnguyen1@os.amperecomputing.com> References: <20230504041945.1377457-1-minhnguyen1@os.amperecomputing.com> X-ClientProxiedBy: SG2PR01CA0124.apcprd01.prod.exchangelabs.com (2603:1096:4:40::28) To PH0PR01MB8048.prod.exchangelabs.com (2603:10b6:510:280::7) Return-Path: minhnguyen1@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB8048:EE_|SN7PR01MB8044:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d26c612-0f59-4319-5381-08db4c56ebc3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YJY5u6CVRHf3JPsvSBnB6+0rtvIYlLnEoRZGNEtk+sU+FNLtGOlOxk8LS4nHtEF5odfB1A+e2pUWReBcpUF9QeNKDmRr6/TPOsbYEfXohvOWkbL4J/CKGt8EDFghfh7ygePfBlAnjJvm2sr9XUYC288cgt3sDvm4HhdX/8LRYTATI/HmlRf0DfafS3J2Jh0Wpmq5CfvqcH6SUTLfUHG3A2bjcVfL0yVxkRwA40CWnBIRYXspAb6s9+Jga60pizHL8Q5kwT2eaqWjv8e/nEb/sE0oFeD5LS7pJNpB4HfW+XrCaGYhbT/K3W5HPeVZJe9kdvwiNQBwzeX/8/iCG2znAw5RLo2OYumNxbv4oRB8joGO3UhMwF4brcC/eM8DN9GqqT1go50/lwQmhFs3/a2OFpxzes8fcGSGeAkoyd1XSk0tmPPJpwH42bcZqqRLStMoLsaY3MC+YIbPFYx4Zd/gS3aIdTeVjRMBdTMA9ubNtWKf8jWUcnD/3o2Dg2zPd8nowccAXI0YS6RIikBtVfEVCG6pqQGO18ANPVyOXQ+A3EVySYPcB1v0z89E+y9fq1R02SHLDKkuHnuEpve5HxaZLXgsdsqv/r16Rhau1iuaKZOJnMk5K8fsXzlpb0jRyYKu X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB8048.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(136003)(39850400004)(366004)(346002)(451199021)(2616005)(52116002)(41300700001)(6486002)(86362001)(316002)(83380400001)(6916009)(66476007)(4326008)(66946007)(66556008)(478600001)(38350700002)(2906002)(38100700002)(26005)(186003)(54906003)(5660300002)(8936002)(6506007)(8676002)(6512007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?xdYWxPNQNeBAhx7Lp2CYd1WyDuhGgfDi+Oqaa1HlA3IQgzRzvpezZEd7rXgv?= =?us-ascii?Q?PYKrXWcC3OKdoFBIDGTat50wWkz10VN6Bra/e8VyT663GUJy7ov8lranIMQU?= =?us-ascii?Q?EZ2LtEqrhH6/OevTYszSLji+yX5apqBxOAwCieMMacQ8pUU+/64zM2BITDdS?= =?us-ascii?Q?nkis//4Sf4db+zwMDAzAR5nhDNZeP5NaPAu5wSYdBO4/3U8NOTx5vqk+fgTC?= =?us-ascii?Q?LycNinn/yGZbxUoZAmURJx39uldSpzB+hcObYC9hESGbeDJkfoTRzkn558rr?= =?us-ascii?Q?7utKdauA0pGez+7vGN991dZegYBL771ETukwRMUIFHoKjyBUAG/NzW2o56uI?= =?us-ascii?Q?HW/NICMj7aWmZ1fenqMM/cvQUht9piEv+6gfL0LsMOhzWMs0qiD7ZX50yca/?= =?us-ascii?Q?vToNK+u+OJb3agl57nGtUChSzAoViHy1JV6Dxf9+MV4qtHa6DSw9DdipXEss?= =?us-ascii?Q?nsp4XUiuCbEfYKC8+WGB8ZXlK2wcMhEKnuwKniq1m3s/5yUHXmWrKaBqLkik?= =?us-ascii?Q?3XBN64d2qg6f16LhqutMBKL09prWEJwGd8nk5p6jRJQcgpAT89SqNt+zNquJ?= =?us-ascii?Q?CiGgGx4Re3Tz3Ae2g+7+O8j7eS1RC5uUJ3hOms8WtAAIW8psNZNqSNfms6HX?= =?us-ascii?Q?AyNW4Z7NXd0Mbo3RR/KxTXm14CdYjwCcepoaqq22QvUkBGfHiQlxet92oJrZ?= =?us-ascii?Q?+ge6q0axw71f181lIuJVWhaW3ADljh+LvMu6SMMtYfI/F8cb7MqRFFkkIisq?= =?us-ascii?Q?44xXWdUKDcQ2X8AX8uF8drLTb+IwfpE3zvI2MhjRjH1Ynd/NkJyYR890G3MS?= =?us-ascii?Q?lMGbhdvGZduN7gc46/hrZdecmZ3A67aoNxyloUgfLQkXi/9iy56cYta5jVOz?= =?us-ascii?Q?Tl7I31k8SUdxp30EkSxEpucewDtzXNzl7lgpFlqnvuBigBeUPDk7q/M3zdxz?= =?us-ascii?Q?PkpinXn2bSC05YsYcZ53JNOzU5MByF018UKAW5X9X9oMjUWLwOsOEroPwctG?= =?us-ascii?Q?yCzcsHWGWNAvjK147bTI5xXhWoNWuZsjYg0vF5BYhdFpLD16G6PV5gLC4Hz3?= =?us-ascii?Q?Bg3X2DMReY1KeLeiGYY8RyN1C0f7GjzSJN3sY/wvLAH7yFI9hqFzpcPWkGB8?= =?us-ascii?Q?epnOxkXFVJPKFsqXWskhFwtcYG2VnN+rG7TeJE7VNpVR31oulwpbA77BVpIj?= =?us-ascii?Q?UxrWL93dokIoL3CelfaEtpjEOhBpOABQGZ1S+jI/j7TyrAdYf57edYONX73w?= =?us-ascii?Q?xQio3qS6eTiyCbKYKG7LxMVNxzC59quEDdAA6RrKWDzY2LWlmP6TSpOe2bng?= =?us-ascii?Q?kBEjKkwNCjM+x/PLAU5eb5bJaTaW5hNor9M511rAZZqiRj5D223aoLulgWo6?= =?us-ascii?Q?2L+n6U+ujOfqm6pIywCfJ3i5dutdd81VY1Dw4n67V15xovDHDM+mz9GYFL0C?= =?us-ascii?Q?nYZ4uWnopg4+HIB5r9ynEIIkqTYQy6gkXjWHhI5mE3IayRlqyIUdnVLeM1EI?= =?us-ascii?Q?+2e0VhTzJmll4VF2mgFH/sIUTa1i5FyE7FwEaSBuTDk85Q7BH02cNcuVKNt9?= =?us-ascii?Q?288jnD3q4FrP8S53RwrDmFt4cAT8BmqX+oFUIMMWnXn4AXvQDqDKsyysL+3J?= =?us-ascii?Q?5+uqM1NpjZgGIaIqEZd9JkRTpga0Xfp9v5PAVgXlc5lP?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d26c612-0f59-4319-5381-08db4c56ebc3 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB8048.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2023 04:20:41.3342 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EKW/kfvqLg+cwiDw6XJkmBbbZifqpCxGAhWzXL3eZ6DhyWFBY9Wpt9UUVLJkBvopAmPof6r6ralv6u29+FRgKYl2ifYFhu7KZOA34fh7MaIAO8yfDf9NxPGJduv0CcmX X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR01MB8044 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Vu Nguyen Id will be casted by CoreOpenProtocol, declare this variable with a wrong type might result in the corruption of other local variables. Signed-off-by: Minh Nguyen Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez Reviewed-by: Nickle Wang --- RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h b/RedfishPkg= /RedfishRestExDxe/RedfishRestExDriver.h index 4a9e9f7b81a4..6b94e5814c43 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h @@ -3,6 +3,7 @@ =20 Copyright (c) 2019, Intel Corporation. All rights reserved.
(C) Copyright 2020 Hewlett Packard Enterprise Development LP
+ Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -84,7 +85,7 @@ struct _RESTEX_SERVICE { // EFI_HANDLE HttpChildHandle; =20 - UINT32 Id; + UINT32 *Id; =20 EFI_REST_EX_SERVICE_INFO RestExServiceInfo; }; --=20 2.39.0