From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.75]) by mx.groups.io with SMTP id smtpd.web10.4619.1681462356092122075 for ; Fri, 14 Apr 2023 01:52:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=iq1JTDoz; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.93.75, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DQr6Wfi4iWnAXNIn5enDbn6Z2fEaHGKm946zypfaPH/xhhnZ0sBAsCML41HVGI3MS/HGG3RnI2SlFhuKPuo/Iq2sLhh3DsARiuYPepPzNaedWnRij9D4o1kBDmhpb5XZPugPwz2/ELc9CxiVdKZ8hk/7G2Vlwpea+2t+c9jWK7CF4o60I7L8WRZPgdUzGZUISNplKR84KGeQUTK9OCiN+EB53aIC5hcDK0ZcZ9oMypk0vb6C5N462iFfkjD0qLNl6UWVuDsHVUKSxysxMYeiGcYETxhbrigQHXcReiaO/TINeedfWqCkk58Yg1h3N1PXaVY/ZDUgHBRp8RHqEUlApg== 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=3JMBVG4F1VlkBXd1W2i/dZND+rATrwJWwApTqoP/joM=; b=QOc+k870DQa5jBCy1rE5cvfqH+IHKQqpsr50/qkjFB2mwnOo2vkOCrzZG4HePJgqH6GNIRXS71qqCADHDRWyCjTeQW/SG8R1zdSHuuA7VR3Dl8MCsWdFhGwT9VFxHOtKWfaMA3BB8MPaRx+yJ+PMwVgXhKPGdpTxE5FsqnRQH4uicNjjOsIKMI868HzKStJg7r1iKaGNbqef+osbUWHKvZdkG+hwrXGUt4vdnOO7R+9MtR4AXrDluVwHIlT2ydJ0zhIdlvqEqmy4zv/3FNeZwzjihnbGQvunKvje9exPqKTTIVDnojXt8weDlyRFhDrVnzaNlLAQLBv/axFCOj0g9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=3JMBVG4F1VlkBXd1W2i/dZND+rATrwJWwApTqoP/joM=; b=iq1JTDozCODmu/wMIEFylMqojrtSAefLyiDK5MOy/yPP2ge5AtzjiuPr5Fks3onBugf/WudGFQSD+GuHNLXGCO+JDVw4gtHD0eUcd24gRoO/WbB/JhdZDzozyWJTWtTRT/DwDa+fvHIj0vXo3hnGkiHKs1dc95xgtC9xoLgFq11pivRO6FVQqqloszIAOGyNHqqwzf7gal6PQ3MaA54u4YQ9NauxjrAH2ycBkZ8MFFepOXHaqX8VJAMgqwuDvhzzWqcLfyImBQaZ2jyZvsk2faBFfQncWeWl/MiweT6TFcXL4/yrBud0CA6YcpnOtWt2TOFGdrlrgZZqPlqwPGhOOw== Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by SN7PR12MB8789.namprd12.prod.outlook.com (2603:10b6:806:34b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Fri, 14 Apr 2023 08:52:34 +0000 Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::deb:4184:674f:c674]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::deb:4184:674f:c674%4]) with mapi id 15.20.6277.038; Fri, 14 Apr 2023 08:52:34 +0000 From: "Nickle Wang" To: Minh Nguyen , "devel@edk2.groups.io" CC: "patches@amperecomputing.com" , "abner.chang@amd.com" , "igork@ami.com" , "nhi@os.amperecomputing.com" , "tinhnguyen@os.amperecomputing.com" , Vu Nguyen Subject: Re: [PATCH 1/5] RedfishPkg: Correct variable type to prevent memory corruption Thread-Topic: [PATCH 1/5] RedfishPkg: Correct variable type to prevent memory corruption Thread-Index: AQHZbqnqWqzNWbf7AkuK1r2GjgDBXa8qf3Cw Date: Fri, 14 Apr 2023 08:52:33 +0000 Message-ID: References: <20230414081903.7892-1-minhnguyen@os.amperecomputing.com> <20230414081903.7892-2-minhnguyen@os.amperecomputing.com> In-Reply-To: <20230414081903.7892-2-minhnguyen@os.amperecomputing.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|SN7PR12MB8789:EE_ x-ms-office365-filtering-correlation-id: 8c7a306a-9d83-4fd9-863a-08db3cc59696 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LOfpTh8kQrRtQSK7hPJryVboNmENPB/YQFWsZL/I3OXBT9X4X2y4aPUpolsf8r6ktKtTKcGb0qtPMWpPNE0mKR6FpjWKCPvxlnDbOl6c2/qWcRWVvSDbOTQkS9s8MT8suUp6HOkVmVIT9AZlpxRqMOSteEOTTvlK4a8jEXJhQI9xhcIiia33ryYxZJ+1yb7ZWztSjMScDUnQ342muoHYeEs2cFvmLb9wYsc9PXinxVJPnWljJP3TkAJRjrWQoEr1MxQcmrb/OvNRwSYvt4V4DtI5WTbeFlY/gD6mruX/DdY4r5k8Khal2Gu1mb8PlIUsFWadC8vNg4hKWEpJaMafli+shnNpp1/PJzrZWgeY6FY+CvL0ssslFmI6TP66v8Ex5TfM1ubhaBK2ngfmNVtnZ9cahqctjaydYOttJxCh9FhtBg1lBXODhSifuIXdxbIQf0CbhM/yavpwri6xBHcsaSG480eMBLb+ETCU9AZcMlpHJTgZYms8pR3FdRZtE01J9gHmo1Zm5VTP6L57itnfGAkIyQok0+rwr1c2DECZtwbzbzxqmSSYptdpYzhjuvgrUTCKbyBmbMVfqj72P0HRBgtXl9NE1q09v0Gi94Xvofeuwez0LlEP1X3LolVxV2ZY x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR12MB7031.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(346002)(376002)(396003)(366004)(451199021)(33656002)(7696005)(26005)(9686003)(6506007)(71200400001)(478600001)(83380400001)(66556008)(54906003)(66476007)(66946007)(76116006)(64756008)(53546011)(66446008)(316002)(110136005)(186003)(86362001)(4326008)(8676002)(41300700001)(52536014)(5660300002)(122000001)(55016003)(2906002)(38100700002)(8936002)(38070700005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xk+gEYq2UsdTz4UXPHdxRdKnb82xoD/Ounmdw6FO/HEbiheMc5V5uq7ZaA7N?= =?us-ascii?Q?8rlqrvPgK6N/AuXU0Lg9aLnA+n/aWy7EPFvR82+luCw2KvsreaHVFY5zS3Rp?= =?us-ascii?Q?WADZk5F69m7AhCNwsuGBWBkQEIX7FoHKrU/xjO7B/OoZlQSRBqoLSOYB2jrJ?= =?us-ascii?Q?zGttUtof4cdMHtnqZttNLE5UaNPU/+Dep5SBEXRDJf37n4XeFI8g2OsYSIjt?= =?us-ascii?Q?NcFIT5w9xS2QJKQoVrRSx9ZPIaWWCk1BN/trfE0FOMcMSlWkRWgkarNkqRXq?= =?us-ascii?Q?pfI/jV/PXCZ3hLDd3dsD7z1LwI/hO/LIGL+9lLX5kV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ii?Q?k2TKvJ/mK8CwnoUO4lvfkXBxJSPgbrGShIJRgQ8QWLRX2KqMDoGH0y/PPDWO?= =?us-ascii?Q?rFX8iEmB4vI2ePXVCecOrERTYNluiqdXuNIQyl/zrj+ZqorumHF6fbtcMfcm?= =?us-ascii?Q?ZKr9l+nmoZsKk3fsBzyDPMGG03BIwj039dk2eKd0nWZfdl5XU8SeW7fcl34q?= =?us-ascii?Q?yv6jAcK2XqPA9oJo2AXJTmxjJtiUw1RhowYXAKKCHn/nbf+EiHTURt0gcWef?= =?us-ascii?Q?XG0pOM2v6gawWQ0WF/TjfOL10mPKiiVkAG7nygzh4WoSOld1ZCFzfaat8qeH?= =?us-ascii?Q?avnhApbl29W0i7R7f3T9rJYRp1dOy3/v1K6YnaiAmytv8whv+bVdZUadzMvV?= =?us-ascii?Q?71hOPmFCk72MMJQksS8=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c7a306a-9d83-4fd9-863a-08db3cc59696 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2023 08:52:33.5557 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: y9Nb7CwX0m/WjlAjGfbrpc8sWM9tKhcF43UP2W7LcL7ZSAAmw6MHf4xchel7dds4jC8yfIFkN0iRaG6bYJBKaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8789 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nickle Wang Regards, Nickle > -----Original Message----- > From: Minh Nguyen > Sent: Friday, April 14, 2023 4:19 PM > To: devel@edk2.groups.io > Cc: patches@amperecomputing.com; abner.chang@amd.com; Nickle Wang > ; igork@ami.com; nhi@os.amperecomputing.com; > tinhnguyen@os.amperecomputing.com; Vu Nguyen > ; Minh Nguyen > > Subject: [PATCH 1/5] RedfishPkg: Correct variable type to prevent memory > corruption >=20 > External email: Use caution opening links or attachments >=20 >=20 > From: Vu Nguyen >=20 > Id will be casted by CoreOpenProtocol, declare this variable with a wrong= type > might result in the corruption of other local variables. >=20 > Signed-off-by: Minh Nguyen > --- > RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > 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; > }; > -- > 2.39.0