mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
Merge branch 'bugfix/smp_sec_flags_v5.2' into 'release/v5.2'
fix(bt/bluedroid): fixed several security issues from NVIDIA (v5.2) See merge request espressif/esp-idf!50570
This commit is contained in:
@@ -1404,10 +1404,12 @@ void btc_hh_cb_handler(btc_msg_t *msg)
|
||||
if (p_dev->local_vup) {
|
||||
p_dev->local_vup = false;
|
||||
BTA_DmRemoveDevice(p_dev->bd_addr, BT_TRANSPORT_BR_EDR);
|
||||
btc_hh_remove_device(p_dev->bd_addr);
|
||||
} else {
|
||||
p_dev->dev_status = ESP_HIDH_CONN_STATE_DISCONNECTED;
|
||||
}
|
||||
|
||||
btc_hh_cb.status = (BTC_HH_STATUS)BTC_HH_DEV_DISCONNECTED;
|
||||
p_dev->dev_status = ESP_HIDH_CONN_STATE_DISCONNECTED;
|
||||
param.close.status = p_data->dev_status.status;
|
||||
} else {
|
||||
BTC_TRACE_ERROR("Error: cannot find device with handle %d", p_data->dev_status.handle);
|
||||
|
||||
@@ -4490,7 +4490,7 @@ void btm_sec_connected (UINT8 *bda, UINT16 handle, UINT8 status, UINT8 enc_mode)
|
||||
(status == HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE) ||
|
||||
(status == HCI_ERR_REPEATED_ATTEMPTS)))) {
|
||||
p_dev_rec->security_required &= ~BTM_SEC_OUT_AUTHENTICATE;
|
||||
p_dev_rec->sec_flags &= ~ (BTM_SEC_LE_LINK_KEY_KNOWN << bit_shift);
|
||||
p_dev_rec->sec_flags &= ~((BTM_SEC_LINK_KEY_KNOWN | BTM_SEC_LINK_KEY_AUTHED) << bit_shift);
|
||||
|
||||
|
||||
#ifdef BRCM_NOT_4_BTE
|
||||
@@ -5453,9 +5453,11 @@ static BOOLEAN btm_sec_start_get_name (tBTM_SEC_DEV_REC *p_dev_rec)
|
||||
*******************************************************************************/
|
||||
static BOOLEAN btm_sec_start_authentication (tBTM_SEC_DEV_REC *p_dev_rec)
|
||||
{
|
||||
p_dev_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING;
|
||||
|
||||
return (btsnd_hcic_auth_request (p_dev_rec->hci_handle));
|
||||
if (btsnd_hcic_auth_request (p_dev_rec->hci_handle)) {
|
||||
p_dev_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -6394,9 +6396,10 @@ void btm_sec_update_legacy_auth_state(tACL_CONN *p_acl_cb, UINT8 legacy_auth_sta
|
||||
*******************************************************************************/
|
||||
void btm_sec_handle_remote_legacy_auth_cmp(UINT16 handle)
|
||||
{
|
||||
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev_by_handle (handle);
|
||||
tACL_CONN *p_acl_cb = btm_bda_to_acl(p_dev_rec->bd_addr, BT_TRANSPORT_BR_EDR);
|
||||
btm_sec_update_legacy_auth_state(p_acl_cb, BTM_ACL_LEGACY_AUTH_REMOTE);
|
||||
tACL_CONN *p_acl_cb = btm_handle_to_acl(handle);
|
||||
if (p_acl_cb) {
|
||||
btm_sec_update_legacy_auth_state(p_acl_cb, BTM_ACL_LEGACY_AUTH_REMOTE);
|
||||
}
|
||||
}
|
||||
#endif /// (CLASSIC_BT_INCLUDED == TRUE)
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
|
||||
Reference in New Issue
Block a user