Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dfb5e99 authored by Brian Delwiche's avatar Brian Delwiche
Browse files

[conflict] Merge "Fix timing attack in BTM_BleVerifySignature" into tm-dev am:...

[conflict] Merge "Fix timing attack in BTM_BleVerifySignature" into tm-dev am: b9bcb27e am: b52dff3f

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/24972364



Merged-In: I7f5646b683209bc6a6fbce8d4702ec311adc9cfc
Merged-In: Ie41ad4ad53ede729261c6f61812d89ae2e3aaac6
Change-Id: Ie41ad4ad53ede729261c6f61812d89ae2e3aaac6
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 4c767751 b52dff3f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
#include "main/shim/btm_api.h"
#include "main/shim/l2c_api.h"
#include "main/shim/shim.h"
#include "openssl/mem.h"
#include "osi/include/allocator.h"
#include "osi/include/properties.h"
#include "stack/btm/btm_dev.h"
@@ -1988,7 +1989,7 @@ bool BTM_BleVerifySignature(const RawAddress& bd_addr, uint8_t* p_orig,

    crypto_toolbox::aes_cmac(p_rec->ble.keys.pcsrk, p_orig, len,
                             BTM_CMAC_TLEN_SIZE, p_mac);
    if (memcmp(p_mac, p_comp, BTM_CMAC_TLEN_SIZE) == 0) {
    if (CRYPTO_memcmp(p_mac, p_comp, BTM_CMAC_TLEN_SIZE) == 0) {
      btm_ble_increment_sign_ctr(bd_addr, false);
      verified = true;
    }