Re: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove redundant sizeof
> -Original Message- > From: Wu, Hao A > Sent: Thursday, July 29, 2021 4:23 PM > To: devel@edk2.groups.io; xiewen...@huawei.com; Wang, Jian J > > Cc: songdongku...@huawei.com; Yao, Jiewen ; > Laszlo Ersek > Subject: RE: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: > remove redundant sizeof > > > -Original Message- > > From: devel@edk2.groups.io On Behalf Of > > wenyi,xie via groups.io > > Sent: Thursday, July 29, 2021 3:45 PM > > To: devel@edk2.groups.io; Wang, Jian J ; Wu, > > Hao A > > Cc: songdongku...@huawei.com; xiewen...@huawei.com; Yao, Jiewen > > ; Laszlo Ersek > > Subject: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: > > remove redundant sizeof > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id= > > > > 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. > > > Thanks. > Reviewed-by: Hao A Wu > > I will wait a couple days before merging to see if any additional comment > from other reviewers. Really sorry, please ignore the previous mail sent (giving the Reviewed-by tag). It was sent by accident. Withdraw my R-b tag for this patch. Best Regards, Hao Wu > > Best Regards, > Hao Wu > > > > > > Cc: Jiewen Yao > > Cc: Jian J Wang > > Cc: Laszlo Ersek > > Signed-off-by: Wenyi Xie > > Reviewed-by: Laszlo Ersek > > --- > > 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 > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78355): https://edk2.groups.io/g/devel/message/78355 Mute This Topic: https://groups.io/mt/84523794/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove redundant sizeof
I think I have given R-B. If no, then Reviewed-by: Jiewen Yao > -Original Message- > From: Wu, Hao A > Sent: Thursday, July 29, 2021 4:23 PM > To: devel@edk2.groups.io; xiewen...@huawei.com; Wang, Jian J > > Cc: songdongku...@huawei.com; Yao, Jiewen ; Laszlo > Ersek > Subject: RE: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove > redundant sizeof > > > -Original Message- > > From: devel@edk2.groups.io On Behalf Of > > wenyi,xie via groups.io > > Sent: Thursday, July 29, 2021 3:45 PM > > To: devel@edk2.groups.io; Wang, Jian J ; Wu, Hao A > > > > Cc: songdongku...@huawei.com; xiewen...@huawei.com; Yao, Jiewen > > ; Laszlo Ersek > > Subject: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove > > redundant sizeof > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id= > > > > 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. > > > Thanks. > Reviewed-by: Hao A Wu > > I will wait a couple days before merging to see if any additional comment from > other reviewers. > > Best Regards, > Hao Wu > > > > > > Cc: Jiewen Yao > > Cc: Jian J Wang > > Cc: Laszlo Ersek > > Signed-off-by: Wenyi Xie > > Reviewed-by: Laszlo Ersek > > --- > > 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 > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78354): https://edk2.groups.io/g/devel/message/78354 Mute This Topic: https://groups.io/mt/84523794/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove redundant sizeof
> -Original Message- > From: devel@edk2.groups.io On Behalf Of > wenyi,xie via groups.io > Sent: Thursday, July 29, 2021 3:45 PM > To: devel@edk2.groups.io; Wang, Jian J ; Wu, Hao A > > Cc: songdongku...@huawei.com; xiewen...@huawei.com; Yao, Jiewen > ; Laszlo Ersek > Subject: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove > redundant sizeof > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id= > > 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. Thanks. Reviewed-by: Hao A Wu I will wait a couple days before merging to see if any additional comment from other reviewers. Best Regards, Hao Wu > > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Laszlo Ersek > Signed-off-by: Wenyi Xie > Reviewed-by: Laszlo Ersek > --- > 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 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78353): https://edk2.groups.io/g/devel/message/78353 Mute This Topic: https://groups.io/mt/84523794/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove redundant sizeof
Execuse me, I made a mistake and sent the wrong patch. Please ignore it. Thanks Wenyi On 2021/7/29 15:45, Wenyi Xie wrote: > REF:https://bugzilla.tianocore.org/show_bug.cgi?id= > > 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 > Cc: Jian J Wang > Cc: Laszlo Ersek > Signed-off-by: Wenyi Xie > Reviewed-by: Laszlo Ersek > --- > 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); > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78349): https://edk2.groups.io/g/devel/message/78349 Mute This Topic: https://groups.io/mt/84523794/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove redundant sizeof
REF:https://bugzilla.tianocore.org/show_bug.cgi?id= 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 Cc: Jian J Wang Cc: Laszlo Ersek Signed-off-by: Wenyi Xie Reviewed-by: Laszlo Ersek --- 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78348): https://edk2.groups.io/g/devel/message/78348 Mute This Topic: https://groups.io/mt/84523794/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove redundant sizeof
Yes, it's a typo. Thanks for fixing it. Reviewed-by: Jian J Wang Regards, Jian > -Original Message- > From: Yao, Jiewen > Sent: Wednesday, April 14, 2021 9:56 AM > To: devel@edk2.groups.io; xiewen...@huawei.com; Wang, Jian J > ; ler...@redhat.com > Cc: songdongku...@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 > > > > > -Original Message- > > From: 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 ; Wang, Jian J > > ; ler...@redhat.com > > Cc: songdongku...@huawei.com; xiewen...@huawei.com > > Subject: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove > > redundant sizeof > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id= > > > > 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 > > Cc: Jian J Wang > > Cc: Laszlo Ersek > > Signed-off-by: Wenyi Xie > > Reviewed-by: Laszlo Ersek > > --- > > 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 > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#74077): https://edk2.groups.io/g/devel/message/74077 Mute This Topic: https://groups.io/mt/82081793/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
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 > -Original Message- > From: 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 ; Wang, Jian J > ; ler...@redhat.com > Cc: songdongku...@huawei.com; xiewen...@huawei.com > Subject: [edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove > redundant sizeof > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id= > > 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 > Cc: Jian J Wang > Cc: Laszlo Ersek > Signed-off-by: Wenyi Xie > Reviewed-by: Laszlo Ersek > --- > 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 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#74075): https://edk2.groups.io/g/devel/message/74075 Mute This Topic: https://groups.io/mt/82081793/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH EDK2 v2 1/1] SecurityPkg/FvReportPei: remove redundant sizeof
REF:https://bugzilla.tianocore.org/show_bug.cgi?id= 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 Cc: Jian J Wang Cc: Laszlo Ersek Signed-off-by: Wenyi Xie Reviewed-by: Laszlo Ersek --- 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#74074): https://edk2.groups.io/g/devel/message/74074 Mute This Topic: https://groups.io/mt/82081793/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-