|
|
@@ -2580,6 +2580,19 @@ static int smp_cmd_ident_addr_info(struct l2cap_conn *conn,
|
|
|
goto distribute;
|
|
|
}
|
|
|
|
|
|
+ /* Drop IRK if peer is using identity address during pairing but is
|
|
|
+ * providing different address as identity information.
|
|
|
+ *
|
|
|
+ * Microsoft Surface Precision Mouse is known to have this bug.
|
|
|
+ */
|
|
|
+ if (hci_is_identity_address(&hcon->dst, hcon->dst_type) &&
|
|
|
+ (bacmp(&info->bdaddr, &hcon->dst) ||
|
|
|
+ info->addr_type != hcon->dst_type)) {
|
|
|
+ bt_dev_err(hcon->hdev,
|
|
|
+ "ignoring IRK with invalid identity address");
|
|
|
+ goto distribute;
|
|
|
+ }
|
|
|
+
|
|
|
bacpy(&smp->id_addr, &info->bdaddr);
|
|
|
smp->id_addr_type = info->addr_type;
|
|
|
|