aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHansong Zhang <hsz@google.com>2021-06-25 00:39:20 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-06-25 00:39:20 +0000
commit03988294734577bc01e677e042619121cbe27714 (patch)
treec6552215240d1b2f258ed8c9f13377f63b5eb8a7
parente79aa24081182333188e49407fd0182077586152 (diff)
parentfb9f699d79084b90537b2cae3f733962ab59159f (diff)
downloadbt-03988294734577bc01e677e042619121cbe27714.tar.gz
SMP: Reject pairing if public_key.x match am: 9fbf77d1a8 am: 6dd3a7aa69 am: 351d594583 am: cf11884e7c am: fb9f699d79
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/15081352 Change-Id: I722d373d4c77fd8094bfcd7abed678c89e8d226b
-rw-r--r--stack/smp/smp_act.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/stack/smp/smp_act.cc b/stack/smp/smp_act.cc
index ba7cbce8a..03d73f781 100644
--- a/stack/smp/smp_act.cc
+++ b/stack/smp/smp_act.cc
@@ -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;