Changelog ========= > Note by myl7 as the maintainer of `open-enclave-bin` in pacman source of Arch Linux: > The changelog has not been updated for a long time. > The information here should be outdated. Major work such as new features, bug fixes, feature deprecations, and other breaking changes should be noted here. It should be more concise than `git log`. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). [Unreleased][Unreleased_log] -------------- ### Added - (#4832) OE SDK now accepts environment variable `OE_INTEL_QVL_LOAD_POLICY`, which can be used to specify the policy for loading [Intel DCAP's QvE](https://github.com/intel/SGXDataCenterAttestationPrimitives) (Quote Verification) for SGX/TDX quote verification. The value can be one of the following: - `SGX_QL_EPHEMERAL` and `SGX_QL_DEFAULT` - Default policy. QvE is initialized and terminated on every quote verification function call. - `SGX_QL_PERSISTENT` - All the threads will share single QvE instance, and QvE is initialized on first use and reused until process ends. - `SGX_QL_EPHEMERAL_QVE_MULTI_THREAD` - QvE is loaded per thread and be unloaded before function exit. - `SGX_QL_PERSISTENT_QVE_MULTI_THREAD` - QvE is loaded per thread and only be unloaded before thread exit. [v0.19.0][v0.19.0_log] -------------- ### Added - OE SDK can now be built with Clang-11 and it is recommended to upgrade the compiler to Clang-11 if you are building the SDK from source. - Building OE SDK enclaves now includes the following LVI mitigation options: - `ControlFlow-GNU` - enables LVI mitigation using the existing GNU-based mitigation specified by `LVI_MITIGATION_BINDIR`. This option is recommended when building OE SDK with Clang-10. - `ControlFlow-Clang` - enables Clang-based LVI mitigations. Choosing this option requires Clang-11. - `ControlFlow` - enables LVI mitigation but default to the recommended method, which is currently ControlFlow-GNU. - `None` - no LVI mitigations are enabled. - *Note*: The packages released in 0.19.0 are built with ControlFlow-GNU mitigations - Added a TDX verifier plugin based on Intel QVL/QvE - Added two public APIs to initialize and shut down the plugin defined in the `openenclave/attestation/tdx/evidence.h` - `oe_tdx_verifier_initialize()` - `oe_tdx_verifier_shutdown()` - Added a new format uuid for TDX quote `OE_FORMAT_UUID_TDX_QUOTE_ECDSA` - Added a new OCALL `oe_verify_tdx_quote_ocall` that is used by the plugin internally (see `openenclave/edl/sgx/tdx_verification.edl`) - Steps for verify a TDX quote 1. Initialize the plugin via `oe_tdx_verifier_initialize` 2. Invoke `oe_verify_evidence` by specifying the quote and format id as `OE_FORMAT_UUID_TDX_QUOTE_ECDSA` 3. Parse the claims (refer the definitions of TDX claims to `openenclave/attestation/evidence.h`) - Note that the `oe_verify_evidence` with the plugin currently does not support input endorsements (must be `NULL`) - Added two APIs `oe_get_tdx_endorsements` and `oe_free_tdx_endorsements` to fetch and free the endorsements for the given TDX quote. The APIs are for users who want to manage (e.g., caching) the endorsements by themselves instead of relying on the existing caching mechanisms (e.g., supported by DCAP). See `openenclave/attestation/tdx/evidence.h` for more detail of the APIs. - Added support for V4 collateral from Intel for SGX and TDX ### Changed - snmalloc (0.6.0) now only requires 16KiB initially per thread, compared to 256 KiB previously (0.5.3). Thread-local heaps only grow by a constant amount until the next power of 2, eg. 16KiB, 16KiB, 32KiB, 64KiB, ... 1MiB, 2MiB, 2MiB, ..., as opposed to a fixed amount previously (256 KiB). Allocator metadata is kept separately, making corruption attacks less likely. There are some applications for which this update in snmalloc will result in an increase in EPC memory as specified in the enclave configuration file. - Open Enclave SDK is no longer tested on Ubuntu 18.04. Ubuntu 18.04 is at EOL. v0.19.0 will not contain packages for Ubuntu 18.04. [v0.18.5][v0.18.5_log] -------------- ### Security - Updated OpenSSL used inside the enclave to v1.1.1t. See [OpenSSL's release notes](https://www.openssl.org/news/openssl-1.1.1-notes.html) for more details [v0.18.4][v0.18.4_log] -------------- ### Added - Added oe_set_host_log_level and oe_set_enclave_log_level APIs to dynamically modify host and enclave log level verbosity, respectively. See #4610 for more details - Added backtrace debug log for unhandled exceptions if the enclave is configured with and CapturePFGPExceptions=1, the backtrace information will be printed in the enclave log when an in-enclave exception is not handled by trusted handlers. If the enclave is not configured with CapturePFGPExceptions=1, the similar helper message in the following will be printed in the log: `2022-07-13T00:25:05+0000.276579Z (H)ERROR] tid(0x7f6cbb2b1f40) | Unhandled in-enclave exception. To get more information, configure the enclave with CapturePFGPExceptions=1 and enable the in-enclave logging.` ### Changed - Fixed bugs in oe_validate_revocation_list regarding PCCS API v3.0 - Fixed issue where oe_hex_dump prints data to stdout, even when logging callback is set - Fixed the issue where enclave stack was not showing up in ocall callstack in Windows debuggers. Added padding to restore offset of callsites field to previous value. ### Security - Updated OpenSSL used inside the enclave to v1.1.1q. See [OpenSSL's release notes](https://www.openssl.org/news/openssl-1.1.1-notes.html) for more details - Update Mbed-TLS used inside the enclave to 2.28.1. See [Mbed-TLS's release notes](https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.1) for more details. [v0.18.2][v0.18.2_log] -------------- ### Changed - Fixed the incorrect behavior of pthread_mutex_init() and std::mutex such that they no longer create a recursive lock by default. Please see issue #4555 for more details. ### Security - Mitigated CVE-2022-21233. Please refer to the [security advisory](https://github.com/openenclave/openenclave/security/advisories/GHSA-v3vm-9h66-wm76) for the same. - The mitigations require an extra copy for ocalls in oeedger8r generated code. - If you are running on a processor that is not affected by the CVE, you can turn off oeedger8r introduced mitigations by defining a global C variable `bool oe_edger8r_secure_unserialize = false;` in enclave side code. ### Deprecated - Ubuntu 18.04 has reached end of support, and will no longer be supported. [v0.18.1][v0.18.1_log] -------------- ### Changed - Calling oe_log from an enclave resulted in partial log output. #4547 fixed this. - Fixed #4540. The fix **does not** introduce functional changes, but updates `memcpy_with_barrier` such that the source address will be always aligned when the function does 2- or 4-byte memory write. - Fixed #4542. The issue affects only those applications that ignore `SIGHUP`, `SIGALRM`, `SIGPIPE`, `SIGPOLL`, `SIGUSR1`, or`SIGUSR2` using `signal(signum, SIG_IGN)` on Linux. The issue has **no impact** on the enclave runtime. [v0.18.0][v0.18.0_log] -------------- ### Added - `oeapkman` is a Linux tool for installing and using Alpine Linux static libraries within enclaves. - The command `oeapkman add package` can be used to install the specified package. Typically `-static` and `-dev` (e.g.: sqlite-static, sqlite-dev) packages need to be installed. - The command `oeapkman root` prints out the path to the Alpine Linux distribution maintained by `oeapkman`. The root path is useful for providing paths to header files and static libraries to the compiler and linker respectively. - The command `oeapkman exec` can be used to execute commands within the Alpine Linux environment. For example, after executing `oeapkman add clang build-base cmake` to install development tools, running `oeapkman exec clang -c file.c` would compile `file.c` in current folder using the clang compiler that has been installed in the Alpine Linux environment. `oeapkman exec bash` would launch a bash shell in the current folder. - The `--optee` prefix can be applied to the commands to target OP-TEE. `oeapkman --optee add sqlite-static` installs aarch64 sqlite static library. `oeapkman --optee exec gcc -c file.c` cross-compile `file.c` to target OP-TEE. - See [samples/apkman](samples/apkman) for a complete example demonstrating use of the `sqlite` database library within enclaves. - Support for `compiler-rt`. `oelibc` includes LLVM's `compiler-rt-10.0.1`. - Update logging function setup API name for SGX Quote Provider plugin to `sgx_ql_set_logging_callback` and mark API name `sgx_ql_set_logging_function` as deprecated. - Add new policy type `OE_POLICY_ENDORSEMENTS_BASELINE` for `oe_verify_evidence` API to pass additional parameters to QVL for more advanced quote validation. - The CapturePFGPExceptions preference is now supported in SGX1 debug mode on Linux. - When setting CapturePFGPExceptions=1, OE will simulate all the SIGSEGV as #PF by forwarding the host information (faulting address) to in-enclave exception handlers. - Note that this feature is for debug only and there is no guarantee that the simulated behavior works the same as the hardware feature in SGX2. - Added the support of using vDSO interfaces for SGX enclaves on Linux to enable synchronous exception handling. The `oehost` library automatically opts into the vDSO interface when it is available (Linux kernel 5.11+). ## Changed - Updated libcxx to version 10.0.1 - Updated the mbedTLS from 2.16 LTS to 2.28 LTS - Updated the SymCrypt-OpenSSL to v1.1.0 - Updated the support of the SymCrypt module to v101.3.0 ### Security - Updated openssl to version 1.1.1o. Please refer to [release notes](https://www.openssl.org/news/openssl-1.1.1-notes.html) to find CVEs addressed by this version. [v0.17.7][v0.17.7_log] ------------- ### Changed - Increased the value of maximum TCS from 32 to 1000, allowing SGX applications to create more threads. ### Security - Updated openssl to version 1.1.1n. Please refer to [release notes](https://www.openssl.org/news/openssl-1.1.1-notes.html) to find CVEs addressed by this version. [v0.17.6][v0.17.6_log] -------------- ### Added - Added support FIPS-enabled OpenSSL based on [SymCrypt](https://github.com/Microsoft/SymCrypt). - Add a new library `oesymcryptengine`, which is a customized build of [SymCrypt OpenSSL engine](https://github.com/Microsoft/SymCrypt-OpenSSL). - To use FIPS-enabled OpenSSL with SymCrypt, users need to link their enclave against both `oesymcryptengine` and `libsymcrypt.so` (part of [SymCrypt](https://github.com/Microsoft/SymCrypt) release packages) in addition to OpenSSL libraries, and include `entropy.edl` in the edl file. Note that `libsymcrypt.so` needs to be placed under the same directory with the enclave binary. - See the [attested_tls sample](samples/attested_tls#build-and-run) for an example of building enclaves with FIPS-enabled OpenSSL based on SymCrypt (set `OE_CRYPTO_LIB` to `openssl_symcrypt_fips`). - Added support for POSIX mmap and munmap. - Enabled MUSL conf functions. - Added callback option to capture and modify enclave logs. ### Security - Update mbedTLS to version 2.16.12. Refer to the [2.16.12](https://github.com/ARMmbed/mbedtls/releases/tag/v2.16.12) release notes for the set of issues addressed. - Note: 2.16 LTS is at End Of Life. mbedTLS libs included with the Open Enclave SDK will move to use the 2.28 LTS branch in the next release. 2.28.0 has certain breaking changes. To understand how these changes will impact your application, please refer to the release notes for [2.28.0](https://github.com/ARMmbed/mbedtls/releases/tag/v2.28.0). [v0.17.5][v0.17.5_log] -------------- ### Added - Added MUSL time functions asctime, asctime_r, ctime, ctime_r, ftime, localtime, localtime_r, strptime, timespec_get, wcsftime. ### Changed - Fixed bug with incorrect layout of thread-local sections (tbss and tdata). Previous releases of OE had a bug where these sections will be laid out incorrectly in some cases where the tbss section had a lower alignment value than tdata section. - OpenSSL is now built with threads support (with the dependency on the host). Note that the previous versions of OpenSSL are not suitable for multi-threaded applications. ### Security - Updated openssl to version 1.1.1l. Please refer to release log to find list of CVEs addressed by this version. [v0.17.2][v0.17.2_log] -------------- ### Security - Updated openssl to version 1.1.1l. Please refer to release log to find list of CVEs addressed by this version. [v0.17.1][v0.17.1_log] -------------- ### Added - Enabled creation of enclaves with base address 0x0 in SGX on Linux. - This feature requires PSW version 2.14.1 or above. - In 0-base enclaves a page fault is thrown on NULL pointer dereference. - This enables applications to adopt NullPointerException/ NullReferenceException in their program logic and/or use other application stacks that do (Example, .NET runtime). - Developers can create an 0-base enclave by setting the oesign tool configuration option 'CreateZeroBaseEnclave' to 1 or by passing in argument CREATE_ZERO_BASE_ENCLAVE=1 in OE_SET_ENCLAVE_SGX2(). - If the 0-base enclave creation is chosen, enclave image start address should be provided by setting the oesign tool configuration option 'StartAddress' or pass in the argument ENCLAVE_START_ADDRESS in OE_SET_ENCLAVE_SGX2(). ### Security - Fix [CVE-2021-33767](https://github.com/openenclave/openenclave/security/advisories/GHSA-mj87-466f-jq42) [v0.17.0][v0.17.0_log] -------------- ### Added - Ubuntu 20.04 packages are included in this release. - OE SDK is now built using clang-10. It is required to upgrade the compiler to clang-10 if you are building the SDK from source. - Add the CapturePFGPExceptions preference for the SGX2 feature of capturing #PF and #GP exceptions inside an enclave. - Developers can specify the CapturePFGPExceptions with a binary value in the enclave config file or set the value via the newly added OE_SET_ENCLAVE_SGX2 macro, which is used to set SGX2-specific properties. - When setting CapturePFGPExceptions=1, the OE loader will enable the feature when running on an SGX2-capable CPU. - Once enabled, the in-enclave exception handler can capture the #PF (with the OE_EXCEPTION_PAGE_FAULT code) and #GP (with the code OE_EXCEPTION_ACCESS_VIOLATION code) exceptions. - More information about the exceptions can be found in the `faulting_address` and `error_code` members of the `oe_exception_record_t` structure passed into the handler. - Add the following attestation claims from oe_verify_evidence(): - OE_CLAIM_TCB_STATUS - OE_CLAIM_TCB_DATE - Publish tool `oeutil`. - The tool, currently under the tools directory, will [integrate multiple OE utilities](tools/oeutil/README.md) in the future. - The tool integrated `oegenerate` in this release. - SGX enclaves created using OE SDK can now be debugged using `oelldb`. `oelldb` is a python based extension for LLDB that supports debugging SGX enclaves. lldb-7 or above is required. - SGX Evidence verification stops checking SGX QEIdentity nextUpdate field. ### Deprecated - The `Release` build type for building the Open Enclave SDK from source is deprecated. The recommendation is using `RelWithDebInfo` instead. [v0.16.1][v0.16.1_log] -------------- ### Added - Add the support for SGX quote verification collateral version 3 with the CRL in DER format by default. Refer to [Get Quote Verification Collateral](https://download.01.org/intel-sgx/sgx-dcap/1.10/linux/docs/Intel_SGX_ECDSA_QuoteLibReference_DCAP_API.pdf) section 3.3.1.5. [v0.16.0][v0.16.0_log] -------------- ### Added - Add the initial support of cryptographic module loading in SGX enclaves. Refer to the [design document](docs/DesignDocs/CryptoModuleLoadingSupport.md) for more detail. - Add the support of getrandom libc API and syscall in enclaves. - Add `libsgx-quote-ex`, `sgx-aesm-service` and several SGX AESM plugins to Ansible scripts so that users will be able to select in-process or out-of-process call path for quote generation. Refer to the [attestation sample](samples/attestation/README.md#determining-call-path-for-sgx-quote-generation) for more information. - Open Enclave SDK installation on Linux sets the environment variable "SGX_AESM_ADDR" to 1 to enable attestation quote generation to occur out of the application process. - Add the support of the OE_ENCLAVE_FLAG_DEBUG_AUTO flag to the oe_create_enclave API. When the flag is set and the OE_ENCLAVE_FLAG_DEBUG flag is cleared, the debug mode is automatically turned on/off based on the value of Debug specified in the enclave config file. - Publish test tool `oegenerate`. - The tool, currently under the tools directory, was originally named oecert under the tests/tools directory. - The tool can be used to generate certificates, reports, and evidence in various formats. - The tool is for debugging purposes and is not suitable for production use. - Full support for SGX KSS (Key Separation and Sharing) including - FamilyID and ExtendedProductionID in enclave configuration file. Refer to [Build and Sign an Enclave](docs/GettingStartedDocs/buildandsign.md) for more information. - config_id and config_svn at enclave loading time. Refer to [Open Enclave Init-time Configuration Interface](docs/DesignDocs/InitTimeConfigurationInterface.md) for more information. ### Changed - The OpenEnclave CMake configuration now explicitly sets CMAKE_SKIP_RPATH to TRUE. This change should not affect fully static-linked enclaves. - oe_verify_attestation_certificate_with_evidence() has been considered insufficient for security and deprecated, because it does not allow users to pass in optional endorsements and policies. Use the new, experimental oe_verify_attestation_certificate_with_evidence_v2() instead to generate a self-signed certificate for use in the TLS handshaking process. - Refer to the [issue](https://github.com/openenclave/openenclave/issues/3820) and the [proposed attestation API requirements](docs/DesignDocs/AttestationApiRequirements.md) for more details. - In/out parameters in EDL now have the default count equals to one if the `count` attribute is not used. - Improved attestation evidence verification performance. - Open Enclave SDK will be built with clang-10 starting v0.17.0 release. We had originally planned to upgrade to clang-10 in the v0.16.0 release, but ran into some issues. We recommend that developers move to clang-10 starting v0.17.0 release. ### Security - Update MUSL to version 1.2.2. Refer to MUSL release notes between version 1.1.22 to 1.2.2 for the set of issues addressed. [v0.15.0][v0.15.0_log] -------------- ### Added - Oeedger8r now supports the warning flag -W