mbed-os/features/FEATURE_BLE/source/generic
Nic Costa c5edbe05b0 Fix race condition when generating OOB data
The GenericSecurityManager tracks the most recent OOB data generated
by the PAL and the PAL function to generate OOB data is expected to
be asynchronous such that the OOB data is returned via a callback.

There was a race condition on the security manager's oob data variable
because it was cleared (set to all zeros) after calling PAL generate.
The expectation was that the clear operation would occur before the
callback executed, but this is proving to not be the case.  Instead,
the callback is being executed as if it were syncronous with PAL
generate, then PAL generate returns and the oob data is cleared,
thereby losing the generated oob data that was set in the callback.

To fix the issue, clear the oob data variables before calling into
the PAL.
2019-01-25 14:29:59 +00:00
..
FileSecurityDb.cpp fix not writing flags in the file 2018-05-22 14:08:09 +01:00
GenericGap.cpp call advertising end even if stopped by us 2019-01-14 13:06:14 +00:00
GenericGattClient.cpp BLE: Move new version of ::GAP in a new class ::ble::Gap . 2018-11-26 10:24:34 +00:00
GenericSecurityManager.cpp Fix race condition when generating OOB data 2019-01-25 14:29:59 +00:00