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

Commit 157300a8 authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

SMP: Reject pairing if public_key.x match am: 92a777a7 am: 8bb26f85

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/15081352

Change-Id: I10e4fd768a27480bc16939b99f631c574b3042a4
parents 2b71057f 8bb26f85
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -689,8 +689,7 @@ void smp_process_pairing_public_key(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
  memcpy(pt.x, p_cb->peer_publ_key.x, BT_OCTET32_LEN);
  memcpy(pt.y, p_cb->peer_publ_key.y, BT_OCTET32_LEN);

  if (!memcmp(p_cb->peer_publ_key.x, p_cb->loc_publ_key.x, BT_OCTET32_LEN) &&
      !memcmp(p_cb->peer_publ_key.y, p_cb->loc_publ_key.y, BT_OCTET32_LEN)) {
  if (!memcmp(p_cb->peer_publ_key.x, p_cb->loc_publ_key.x, BT_OCTET32_LEN)) {
    android_errorWriteLog(0x534e4554, "174886838");
    SMP_TRACE_WARNING("Remote and local public keys can't match");
    tSMP_INT_DATA smp;