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

Open
wmjdgla opened this issue Apr 8, 2024 · 0 comments

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;

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

1 participant