Skip to content

Commit

Permalink
Updating OE Submodule
Browse files Browse the repository at this point in the history
Signed-off-by: Ragavan Dasarathan <[email protected]>
  • Loading branch information
mrragava committed Aug 10, 2021
1 parent 1422ff2 commit a16f83a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if [[ ! -d "${OE_INSTRUMENTED_BUILD}" ]]; then
pushd "${OE_INSTRUMENTED_BUILD}"
cmake "${OE_SRC_ROOT}" -GNinja \
-DENABLE_FUZZING=ON \
-DBUILD_OEGENERATE_TOOL=OFF \
-DBUILD_OEUTIL_TOOL=OFF \
-DBUILD_TESTS=OFF \
-DCMAKE_C_COMPILER="${CLANG}" \
-DCMAKE_CXX_COMPILER="${CLANG_CPP}" \
Expand Down
2 changes: 1 addition & 1 deletion src/dynamic/fuzzing/fuzzsupport/enc/enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void *__dlsym(void *restrict handle, const char *restrict name, void *restrict s
if (result != OE_OK)
goto done;

const uint8_t* baseaddr = (const uint8_t*)__oe_get_enclave_base();
const uint8_t* baseaddr = (const uint8_t*)__oe_get_enclave_base_address();
uint64_t* dest = (uint64_t*)(baseaddr + offset);

ret = (void*)dest;
Expand Down
8 changes: 8 additions & 0 deletions src/dynamic/fuzzing/sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Sample enclave fuzzer target

This is a sample target showing [host](host/host.cpp) and [enclave](enc/enc.cpp) to fuzz ECALL of an enclave.

1. To implement a enclave target link [fuzzsupport](../fuzzsupport) library in your project which provides functions that are required for enclave libfuzzer.
2. Implement a class which derives from [oe_fuzzer_host](../common/oefuzzer.h)
3. Create and load the enclave in your constructor
4. Override the fuzz fucntion to invoke the target fucntion with approprioate payload data type casting.
2 changes: 1 addition & 1 deletion sut/openenclave
Submodule openenclave updated 7180 files

0 comments on commit a16f83a

Please sign in to comment.