tianocore / edk2

EDK II
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
Other
4.51k stars 2.44k forks source link

Bug with data unmarshaling in SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c #5536

Closed wmjdgla closed 13 hours ago

wmjdgla commented 4 months ago

OutPublic->publicArea.parameters.rsaDetail.exponent is 32 bits but is unmarshaled as 16 bits: https://github.com/tianocore/edk2/blob/b7f8779fe1f60113fdaab3b2f3f17c9f900b0456/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c#L255-L256

Definition of the struct in which exponent resides: https://github.com/tianocore/edk2/blob/b7f8779fe1f60113fdaab3b2f3f17c9f900b0456/MdePkg/Include/IndustryStandard/Tpm20.h#L1582-L1587

jyao1 commented 2 months ago

Yes, agree this is a bug. Do you want to propose a patch?