diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 2362cad43b1d..198773c1cc7c 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2669,6 +2669,12 @@ static inline void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff BT_DBG("Conn pending sec level is %d, ssp is %d, key len is %d", conn->pending_sec_level, conn->ssp_mode, key->pin_len); } + if (conn && (conn->ssp_mode == 0) && + (conn->pending_sec_level == BT_SECURITY_VERY_HIGH) && + (key->pin_len != 16)) { + BT_DBG("Security is high ignoring this key"); + goto not_found; + } if (key->key_type == 0x04 && conn && conn->auth_type != 0xff && (conn->auth_type & 0x01)) {