Skip to content

Fix memory range check on ecall#1553

Merged
achamayou merged 2 commits into
microsoft:masterfrom
achamayou:fix_memory_check_on_ecall_args
Sep 1, 2020
Merged

Fix memory range check on ecall#1553
achamayou merged 2 commits into
microsoft:masterfrom
achamayou:fix_memory_check_on_ecall_args

Conversation

@achamayou
Copy link
Copy Markdown
Member

@achamayou achamayou commented Sep 1, 2020

Adjustment to #1492, which introduced range checks that weren't quite right. We want to check that the entire buffer subject to user_check is strictly outside enclave memory (https://github.com/openenclave/openenclave/blob/b9ae53c1e580fd1af4760f914d53cba1650068ae/include/openenclave/enclave.h#L105) and fail if it's not.

Current code instead checks for strictly in-enclave buffers, and would therefore be satisfied by a partially in-enclave buffer.

Thank you to Zhaofeng Chen, Qinkun Bao, Mingshen Sun, and Kang Li from Baidu Security for spotting and reporting this issue.

@achamayou achamayou requested a review from a team as a code owner September 1, 2020 15:07
@ghost
Copy link
Copy Markdown

ghost commented Sep 1, 2020

fix_memory_check_on_ecall_args@12158 aka 20200901.12 vs master ewma over 50 builds from 11648 to 12155
images

@achamayou achamayou merged commit 5530f71 into microsoft:master Sep 1, 2020
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