Merge branch 'bugfix/reset_irk_when_all_unpair_v5.0' into 'release/v5.0'

fix(nimble): Fixed BLE security vulnerability when using fixed IRK (v5.0)

See merge request espressif/esp-idf!32202
This commit is contained in:
Jiang Jiang Jian
2024-08-15 15:49:37 +08:00
3 changed files with 19 additions and 1 deletions

View File

@ -163,6 +163,16 @@ config BT_NIMBLE_NVS_PERSIST
help help
Enable this flag to make bonding persistent across device reboots Enable this flag to make bonding persistent across device reboots
config BT_NIMBLE_SMP_ID_RESET
bool "Reset device identity when all bonding records are deleted"
default n
help
There are tracking risks associated with using a fixed or static IRK.
If enabled this option, Bluedroid will assign a new randomly-generated IRK
when all pairing and bonding records are deleted. This would decrease the ability
of a previously paired peer to be used to determine whether a device
with which it previously shared an IRK is within range.
menuconfig BT_NIMBLE_SECURITY_ENABLE menuconfig BT_NIMBLE_SECURITY_ENABLE
bool "Enable BLE SM feature" bool "Enable BLE SM feature"
depends on BT_NIMBLE_ENABLED depends on BT_NIMBLE_ENABLED

View File

@ -824,6 +824,14 @@
#define MYNEWT_VAL_BLE_SM_THEIR_KEY_DIST (0) #define MYNEWT_VAL_BLE_SM_THEIR_KEY_DIST (0)
#endif #endif
#ifndef MYNEWT_VAL_BLE_SMP_ID_RESET
#ifdef CONFIG_BT_NIMBLE_SMP_ID_RESET
#define MYNEWT_VAL_BLE_SMP_ID_RESET CONFIG_BT_NIMBLE_SMP_ID_RESET
#else
#define MYNEWT_VAL_BLE_SMP_ID_RESET (0)
#endif
#endif
#ifndef MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS #ifndef MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS
#define MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS (CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS) #define MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS (CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS)
#endif #endif