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.103]) by mx.groups.io with SMTP id smtpd.web10.4245.1681460400726795747 for ; Fri, 14 Apr 2023 01:20:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=Ugs+8nUC; spf=pass (domain: os.amperecomputing.com, ip: 40.107.94.103, mailfrom: minhnguyen@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ktlGIerAieNgo/cBvaRfS6lcNhClv6Gurvv2eb756FPZi3l6bwbiZtxjOLT3AvtUPhucAkCqm4z1L0kgC0L8d42q52zpTxPoHzJOGjNIlDcEiLM4OFCb74RRy+MI7k0eiKQHmPfKJZ9A6dkabMd95uAMGxkD1yhbP5vFrMV6uZVpIZ25DrLdy3m+6Kh3bzjc23+ySymHCAha5GnxyEAJUsn6FwkeQg9zRIpAQTC1WQo+yOsP3bxkoc4iMcLzItaN70xnsVFlcRqmh82TiPSwJLurYA/nDqOd4E2w4pqJUOrZrPhaeYUmqAuXsDwpxeuxW9IwQcEtJ6EKvz66y+RTSg== 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=Cjkjh3YQoumAFGxRRQZqAAbHu/uQbdKrqZm4WfaKR+k=; b=jEB2deOMY0PZ8MKaraSmIkgtHGPco/bfJB7fmfhYb4tQzA/BeNaDcDcy2A5yM2CE/f4A4z3R/65Tx7Q91+7OQzhxUgTi+QYFkZbF8IT4rQQivAHTydaH8DQXdUPiPpNCFpzY/fIBwm2vPMsfhXi3eT4BwYrNT/sDEyGxi7wMTNEASaMNj1W+RSMPtgpv0Z0zkrHBD0EPSzo0OWsG3LBF4MsHk9tH1TpW7d1IgagQPX0cIwd5ABIDm/wACoJc6MVGH4pIdLSBBu7+Awhz+8dQLP2qulFwei/OBFiNSBwPC/LdibZ9JTZXWQ9pCBDGkD2VSB/THHGQGcMSUav3k7SBDw== 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=Cjkjh3YQoumAFGxRRQZqAAbHu/uQbdKrqZm4WfaKR+k=; b=Ugs+8nUCqeQJ9kAmfqnIzq8xdnvnRJuTd3sLsUTd7FgFWJICJFymsXoLaygrceiGGDgYJNgYFihFe3uP6LN0i49kQJjH4nMEgM5Va2ZSUUACEeVHAT/HTEKlR1KYsbRf803PjarGYT4j/2E5BmgsfJu4NRDBslQ1OObqAacmmeg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from BYAPR01MB4038.prod.exchangelabs.com (2603:10b6:a03:5b::28) by LV2PR01MB7599.prod.exchangelabs.com (2603:10b6:408:17c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.6; Fri, 14 Apr 2023 08:19:58 +0000 Received: from BYAPR01MB4038.prod.exchangelabs.com ([fe80::ca46:c19a:9542:40a6]) by BYAPR01MB4038.prod.exchangelabs.com ([fe80::ca46:c19a:9542:40a6%7]) with mapi id 15.20.6298.030; Fri, 14 Apr 2023 08:19:58 +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, tinhnguyen@os.amperecomputing.com, Vu Nguyen , Minh Nguyen Subject: [PATCH 1/5] RedfishPkg: Correct variable type to prevent memory corruption Date: Fri, 14 Apr 2023 15:18:59 +0700 Message-ID: <20230414081903.7892-2-minhnguyen@os.amperecomputing.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230414081903.7892-1-minhnguyen@os.amperecomputing.com> References: <20230414081903.7892-1-minhnguyen@os.amperecomputing.com> X-ClientProxiedBy: SI1PR02CA0037.apcprd02.prod.outlook.com (2603:1096:4:1f6::13) To BYAPR01MB4038.prod.exchangelabs.com (2603:10b6:a03:5b::28) Return-Path: minhnguyen@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR01MB4038:EE_|LV2PR01MB7599:EE_ X-MS-Office365-Filtering-Correlation-Id: 781ca782-d7e6-4a81-65dc-08db3cc108c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kqVkchRAjc3C6cjBILL7iQ0Nhd0ehJF3eCfAS0cLYIxhiL2t0Km0816Zrxsl3q/64MblkO7jX83vN0B4cTY7H01i5qN6BAQ/yfPCA844tfMVgAJ51EBTxpbxEXFXioB3TcRf0xYyAL1alENei2amS3ly9II6VAlxplP9N0MwPd782zGQ0Q1kxuGVqrdIcS6GvIlf79+kkWfMgHl4hpV1ZhL066YH1gtQxJNnIZvwEPp2pYF7U3+6WISDg68fr0OfMzZHRKVQ7PFEyv8cR0fKYO7JCO4QsVZZpYkUEfLaaP3JqpCXivn6C4K0Pmf3IZbIb7wSPbKkWNT5ODYz6jFRRFSKBtSK1xQkFmjbI3yUOSFDrXDrS9gt4AwQZIZKkyeS/yjHrTfI12av6h2ipZTKdEtnRxEWKOvDE/aK5QIjZqEJUyWt5cwVIDJQIVAHK5Zeumc4Qt8jS92PwkWI6e/8GKgqdxcUuA6p/52oLXDeB4d1SY8KCBA6EbSQZAsqFPVqy5tVsfEseRTN7mJUDioSsBSIkxs6ez2SDV9qU409yohLxkVGsmhcKJAW7jj3iYB/bKcdK7Ih47ueKR/mddvOiDdfRCaEpJM20uH6DyrU9I7yocdLMdhoGeWNbEhmLsX2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR01MB4038.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(136003)(39850400004)(366004)(396003)(451199021)(478600001)(107886003)(54906003)(8676002)(8936002)(86362001)(26005)(1076003)(6512007)(6506007)(38100700002)(316002)(38350700002)(52116002)(6486002)(186003)(6916009)(4326008)(66556008)(66476007)(66946007)(41300700001)(83380400001)(5660300002)(2906002)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?xTdH48gaMtpbm2xjsN0KPamKSsd+sJmQY7+YBbMc4cxTLiTES5jKNwCKMzfK?= =?us-ascii?Q?Hsn47L/lEq3r4TwYetbCvUR+OvQCeurnavLnS0C+caUIR1ZGjPgz35ursbGh?= =?us-ascii?Q?YnB4LBFufzgpgL+f2Gn1NGM1iyhW34xQHnnLKnfV2f2FHACFM79zJhYveGkI?= =?us-ascii?Q?Wo/IFTHQITk25XvIzsX+xUTJh5+gs8nkN/0TyvwhZ03tFPYRXI8RSF0nMVru?= =?us-ascii?Q?zWWsuB7HL8f1DnJifd/jAKjiOoT4bZ6VRN3mvvvZA071dxj5QrnxKnAzoMX+?= =?us-ascii?Q?MiJtU2Xhb/VFI53OaktY2Nu+pOrDOmLdwUT5ao1R8YyRceY5LsskQW+LSbX1?= =?us-ascii?Q?KAI22qd+BPm4++ud1JnfRmNXGwHj452R+bDj8RsavoWVhje4ao32ANvn2rhc?= =?us-ascii?Q?rdKkWl6I6D3spt8TKROydRKiVibaKdabOS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?Q?jOQ0SP3xPvOc6yfNFg7y+e3okFEmIisAINzu8lIgbKBsjHz+/dSeXjxCMhYc?= =?us-ascii?Q?jf6Q4nVIuScx9Ot+o5oKxLb2zu9I0tncIsfkcZQirOpiMm4IvduDRuVvrUu7?= =?us-ascii?Q?FVcBBubszb/QsxymAwLTcXVObEYprUgK3RFuwhv5xJW5H1FxKITtR/H68q1D?= =?us-ascii?Q?XRHuqUZOsTHJIvNtEg1xZE42/vkuZsGK1duKw464mp8MeTuij0/hMVGt+9UD?= =?us-ascii?Q?QtraXmptmewEbLndjbCtnldj/iof/dmwSaMbMKJJEpm29uxVm8w55KLH6uDE?= =?us-ascii?Q?O4bGqVqP523/nOYZNP40DyhKUrqB//MIXRxK7lS5URRf?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 781ca782-d7e6-4a81-65dc-08db3cc108c9 X-MS-Exchange-CrossTenant-AuthSource: BYAPR01MB4038.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2023 08:19:58.1221 (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: GFXBUpNW4DWkgzBe6s4kvIzBl3AVAgUjc7CyfafLv66QVe/HlIGKIti8CT8EGGkp+pC+dhgA6mYMnYD7T4wNPmtBP61mqc/FXEjimq3AJWwvvHwpzxEPSHQYmlylaSYH X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR01MB7599 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 --- 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