pw_bluetooth_sapphire: Fix UAF in `EnableEncryption` Fix a Use-After-Free (UAF) vulnerability in `SecureSimplePairingState::EnableEncryption` and `LegacyPairingState::EnableEncryption` by updating the internal state before invoking the status callback. This means that no member variables are accessed after the callback deallocates the pairing state object. Fixed: b/512561259 Fixed: b/535176265 Change-Id: I1318ad0de02274ed7de95fce454993c9257471fe Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/482641
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.