Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wmjdgla opened this issue Apr 8, 2024 · 1 comment

Comments

@wmjdgla
Copy link

wmjdgla commented Apr 8, 2024

OutPublic->publicArea.parameters.rsaDetail.exponent is 32 bits but is
unmarshaled as 16 bits:

OutPublic->publicArea.parameters.rsaDetail.exponent = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));
Buffer += sizeof (UINT32);

Definition of the struct in which exponent resides:

typedef struct {
TPMT_SYM_DEF_OBJECT symmetric;
TPMT_RSA_SCHEME scheme;
TPMI_RSA_KEY_BITS keyBits;
UINT32 exponent;
} TPMS_RSA_PARMS;

@jyao1
Copy link
Contributor

jyao1 commented Jun 28, 2024

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

zodf0055980 pushed a commit to zodf0055980/edk2 that referenced this issue Aug 21, 2024
According issue tianocore#5536, exponent is 32 bits but is unmarshaled as 16 bits.
zodf0055980 added a commit to zodf0055980/edk2 that referenced this issue Aug 21, 2024
According issue tianocore#5536, exponent is 32 bits but is unmarshaled as 16 bits.
zodf0055980 added a commit to zodf0055980/edk2 that referenced this issue Aug 21, 2024
According issue tianocore#5536, exponent is 32 bits but is unmarshaled as 16 bits.
zodf0055980 added a commit to zodf0055980/edk2 that referenced this issue Aug 21, 2024
According issue tianocore#5536, exponent is 32 bits but is unmarshaled as 16 bits.

Signed-off-by: zodf0055980 <[email protected]>
mdkinney pushed a commit to zodf0055980/edk2 that referenced this issue Aug 31, 2024
According issue tianocore#5536, exponent is 32 bits but is unmarshaled as 16 bits.

Signed-off-by: zodf0055980 <[email protected]>
mergify bot pushed a commit that referenced this issue Aug 31, 2024
According issue #5536, exponent is 32 bits but is unmarshaled as 16 bits.

Signed-off-by: zodf0055980 <[email protected]>
@jyao1 jyao1 closed this as completed Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants