From: "Wang, Jian J" <jian.j.wang@intel.com>
To: "Yao, Jiewen" <jiewen.yao@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"xiewenyi2@huawei.com" <xiewenyi2@huawei.com>,
"lersek@redhat.com" <lersek@redhat.com>
Cc: "songdongkuang@huawei.com" <songdongkuang@huawei.com>
Subject: Re: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove redundant sizeof
Date: Wed, 14 Apr 2021 02:34:46 +0000 [thread overview]
Message-ID: <CO1PR11MB49458E44FEA9051CBBE4C373B64E9@CO1PR11MB4945.namprd11.prod.outlook.com> (raw)
In-Reply-To: <BY5PR11MB4166E5506D459F92EC9EDCB18C4E9@BY5PR11MB4166.namprd11.prod.outlook.com>
Yes, it's a typo. Thanks for fixing it.
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Regards,
Jian
> -----Original Message-----
> From: Yao, Jiewen <jiewen.yao@intel.com>
> Sent: Wednesday, April 14, 2021 9:56 AM
> To: devel@edk2.groups.io; xiewenyi2@huawei.com; Wang, Jian J
> <jian.j.wang@intel.com>; lersek@redhat.com
> Cc: songdongkuang@huawei.com
> Subject: RE: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove
> redundant sizeof
>
> It seems typo. I will let Jian to double confirm.
>
> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
>
>
>
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of wenyi,xie
> > via groups.io
> > Sent: Wednesday, April 14, 2021 9:44 AM
> > To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J
> > <jian.j.wang@intel.com>; lersek@redhat.com
> > Cc: songdongkuang@huawei.com; xiewenyi2@huawei.com
> > Subject: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove
> > redundant sizeof
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3333
> >
> > In function InstallPreHashFvPpi, when calculating the size
> > of struct HASH_INFO,sizeof is used twice. This bug does
> > not lead to buffer overflow, "sizeof (HASH_INFO)" is 4,
> > whereas "sizeof (sizeof (HASH_INFO))" is 4 or 8.
> >
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
> > Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> > ---
> > SecurityPkg/FvReportPei/FvReportPei.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/SecurityPkg/FvReportPei/FvReportPei.c
> > b/SecurityPkg/FvReportPei/FvReportPei.c
> > index d709760ea3ce..e82413e090c0 100644
> > --- a/SecurityPkg/FvReportPei/FvReportPei.c
> > +++ b/SecurityPkg/FvReportPei/FvReportPei.c
> > @@ -67,7 +67,7 @@ InstallPreHashFvPpi (
> > HASH_INFO *HashInfo;
> >
> > PpiSize = sizeof (EDKII_PEI_FIRMWARE_VOLUME_INFO_PREHASHED_FV_PPI)
> > - + sizeof (sizeof (HASH_INFO))
> > + + sizeof (HASH_INFO)
> > + HashSize;
> >
> > PreHashedFvPpi = AllocatePool (PpiSize);
> > --
> > 2.20.1.windows.1
> >
> >
> >
> >
> >
next prev parent reply other threads:[~2021-04-14 2:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 1:43 [PATCH EDK2 v2 0/1] SecurityPkg/FvReportPei: remove redundant sizeof wenyi,xie
2021-04-14 1:43 ` [PATCH EDK2 v2 1/1] " wenyi,xie
2021-04-14 1:55 ` [edk2-devel] " Yao, Jiewen
2021-04-14 2:34 ` Wang, Jian J [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-07-29 7:45 [PATCH EDK2 v2 0/1] " wenyi,xie
2021-07-29 7:45 ` [PATCH EDK2 v2 1/1] " wenyi,xie
2021-07-29 8:23 ` [edk2-devel] " Wu, Hao A
2021-07-29 8:24 ` Yao, Jiewen
2021-07-29 8:24 ` Wu, Hao A
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CO1PR11MB49458E44FEA9051CBBE4C373B64E9@CO1PR11MB4945.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox