Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
3564: Replace temporary_buffer_size with NULL in _get_attester_plugins() r=yentsanglee a=ryanhsu19

Replace `&temporary_buffer_size` in line 378 in `enclave/sgx/attester.c` with `NULL`.

The value of `temporary_buffer_size` is already validated near line 360 where `oe_get_supported_attester_format_ids_ocall` is first called, which eventually calls `oe_sgx_get_supported_attester_format_ids` in `host/sgx/sgxquote.c` and does check against supplied buffer size.

Fix openenclave#3500 .

Signed-off-by: Ryan Hsu <[email protected]>

Co-authored-by: Ryan Hsu <[email protected]>
  • Loading branch information
oeciteam and ryanhsu19 committed Sep 20, 2020
2 parents 66d6a62 + e926103 commit 98b71a4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions enclave/sgx/attester.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,7 @@ static oe_result_t _get_attester_plugins(

// Get the format IDs
result = oe_get_supported_attester_format_ids_ocall(
(uint32_t*)&retval,
temporary_buffer,
temporary_buffer_size,
&temporary_buffer_size);
(uint32_t*)&retval, temporary_buffer, temporary_buffer_size, NULL);
OE_CHECK(result);
OE_CHECK(retval);
}
Expand Down

0 comments on commit 98b71a4

Please sign in to comment.