Skip to content

Commit e5c1a03

Browse files
committed
fix(nimble): Fixed BLE security vulnerability when using fixed IRK
1 parent e78cd20 commit e5c1a03

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

components/bt/host/nimble/Kconfig.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ config BT_NIMBLE_NVS_PERSIST
164164
help
165165
Enable this flag to make bonding persistent across device reboots
166166

167+
config BT_NIMBLE_SMP_ID_RESET
168+
bool "Reset device identity when all bonding records are deleted"
169+
default n
170+
help
171+
There are tracking risks associated with using a fixed or static IRK.
172+
If enabled this option, Bluedroid will assign a new randomly-generated IRK
173+
when all pairing and bonding records are deleted. This would decrease the ability
174+
of a previously paired peer to be used to determine whether a device
175+
with which it previously shared an IRK is within range.
176+
167177
menuconfig BT_NIMBLE_SECURITY_ENABLE
168178
bool "Enable BLE SM feature"
169179
depends on BT_NIMBLE_ENABLED

components/bt/host/nimble/nimble

components/bt/host/nimble/port/include/esp_nimble_cfg.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,14 @@
892892
#define MYNEWT_VAL_BLE_SM_THEIR_KEY_DIST (0)
893893
#endif
894894

895+
#ifndef MYNEWT_VAL_BLE_SMP_ID_RESET
896+
#ifdef CONFIG_BT_NIMBLE_SMP_ID_RESET
897+
#define MYNEWT_VAL_BLE_SMP_ID_RESET CONFIG_BT_NIMBLE_SMP_ID_RESET
898+
#else
899+
#define MYNEWT_VAL_BLE_SMP_ID_RESET (0)
900+
#endif
901+
#endif
902+
895903
#ifndef MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS
896904
#define MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS (CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS)
897905
#endif

0 commit comments

Comments
 (0)