Executive brief
Zephyr's Bluetooth Mesh implementation leaks cryptographic key storage slots each time a subnet is deleted, key refresh occurs, or the device is reset. An administrator controlling the Bluetooth Mesh network can trigger these operations repeatedly, exhausting the 16 available key slots after roughly a dozen cycles and preventing the node from adding new subnets or completing key refresh operations. The device remains unusable for Bluetooth Mesh operations until rebooted.
Technical details
The vulnerability is a resource leak in PSA Crypto key slot management within subsys/bluetooth/mesh/subnet.c. The net_keys_create() function imports a Private Beacon Key into a PSA key slot when CONFIG_BT_MESH_PRIV_BEACONS is enabled (default), but subnet_keys_destroy() guarded the matching psa_destroy_key() call with CONFIG_BT_MESH_V1d1, a Kconfig symbol that was removed. This caused the destroy branch to become permanently dead code, leaking one key slot per subnet teardown. Subnet teardown is triggered by the Config Server NetKey Delete command, Key Refresh Procedure completion, or device reset—all operations reachable over Bluetooth Mesh under the node's device key, executable by the provisioner or network administrator. With the default PSA_KEY_SLOT_COUNT of 16, the shared key-slot pool exhausts after approximately 12 cycles, causing bt_mesh_private_beacon_key() and subsequent subnet creation to fail, blocking subnet addition and key refresh operations. The fix aligns the destroy guard with the import guard (CONFIG_BT_MESH_PRIV_BEACONS) to ensure each allocated slot is properly freed.
Affected products
- Zephyr Project Zephyr versions prior to the fix commit f573da9f
Timeline
- 2026-08-02: disclosed
- 2026-08-02: patched: Fix commit f573da9f53630082ae95fcfd39fb021fe15f7abd aligns destroy guard with import guard in subnet_keys_destroy()