aws / aws-nitro-enclaves-cli

Tooling for Nitro Enclave Management
Apache License 2.0
122 stars 81 forks source link

nitro_enclaves: Fix race when accessing has_event flag #585

Open clupuishere opened 8 months ago

clupuishere commented 8 months ago

The has_event flag is set while holding the enclave_info_mutex mutex. Let's also hold the mutex while reading the flag to avoid races.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.