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

Fix buffer check error of p_additional_MACtext_length #313

Merged
merged 2 commits into from
Sep 19, 2018
Merged

Fix buffer check error of p_additional_MACtext_length #313

merged 2 commits into from
Sep 19, 2018

Conversation

dingelish
Copy link
Contributor

@dingelish dingelish commented Sep 14, 2018

As claimed in the developer's reference, sgx_unmac_aadata and sgx_unseal_data accept an argument p_additional_MACtext_length which is a uint32_t * and points to the length of the additional mac text length (uint32_t). These two functions check if the length arg is within the enclave memory area, which is essential. However, the check codes invoking sgx_is_within_enclave and sgx_is_outside_enclave set the length of buffer to 8 which is sizeof(uint32_t *) instead of 4 which is sizeof(uint32_t). Obviously, it is a logic error. It should only check 4 bytes instead of 8. Patch and immediate upgrade are desired.

Signed-off-by: Yu Ding dingelish@gmail.com

Signed-off-by: Yu Ding <dingelish@gmail.com>
sdk/tseal/tSeal.cpp Show resolved Hide resolved
Signed-off-by: Yu Ding <dingelish@gmail.com>
@lzha101 lzha101 merged commit c08051e into intel:master Sep 19, 2018
llly added a commit to llly/linux-sgx that referenced this pull request Sep 28, 2018
These PRs are lost in Linux 2.3.1 Open Source Gold Release

Signed-off-by: Li, Xun <xun.li@intel.com>
andyzyb added a commit that referenced this pull request Sep 28, 2018
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

Successfully merging this pull request may close these issues.

2 participants