Android security tags, read closely by Lightrion

CVE-2023-40090 AI-generated analysis

platform/packages/modules/Bluetooth, system/stack/btm (BLE security, LE data signature verification)

AI-generated: written from the bulletin and the fixing diffs by claude-fable-5-1, then checked against the code by claude-opus-5-5 (4 corrections). Verify against the commit before relying on it.

Replaces the plain memcmp used to compare the computed AES-CMAC with the received signature in BTM_BleVerifySignature with BoringSSL's CRYPTO_memcmp, which is hardened against timing side channels.

Root cause

In system/stack/btm/btm_ble.cc, BTM_BleVerifySignature computes an AES-CMAC over the signed data with the peer's CSRK (p_rec->ble.keys.pcsrk) via crypto_toolbox::aes_cmac into p_mac. It then compared p_mac with the received signature p_comp using the stock memcmp over BTM_CMAC_TLEN_SIZE bytes. The commit message says this stock memcmp allows signature contents to be deduced through a side-channel (timing) attack. The bulletin rates the issue High / EoP.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to December 2023 · Findings