mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-02 18:10:57 +02:00
fix(bt): check bd address only for bredr in bluedroid host l2cu_allocate_lcb()
(cherry picked from commit 61c13ef849
)
Co-authored-by: Shen Weilong <shenweilong@espressif.com>
This commit is contained in:
@@ -67,7 +67,8 @@ tL2C_LCB *l2cu_allocate_lcb (BD_ADDR p_bd_addr, BOOLEAN is_bonding, tBT_TRANSPOR
|
|||||||
/* Check if peer device's and our BD_ADDR is same or not. It
|
/* Check if peer device's and our BD_ADDR is same or not. It
|
||||||
should be different to avoid 'Impersonation in the Pin Pairing
|
should be different to avoid 'Impersonation in the Pin Pairing
|
||||||
Protocol' (CVE-2020-26555) vulnerability. */
|
Protocol' (CVE-2020-26555) vulnerability. */
|
||||||
if (memcmp((uint8_t *)p_bd_addr, (uint8_t *)&controller_get_interface()->get_address()->address, sizeof (BD_ADDR)) == 0) {
|
if ((transport == BT_TRANSPORT_BR_EDR) &&
|
||||||
|
(memcmp((uint8_t *)p_bd_addr, (uint8_t *)&controller_get_interface()->get_address()->address, sizeof (BD_ADDR)) == 0)) {
|
||||||
L2CAP_TRACE_ERROR ("%s connection rejected due to same BD ADDR", __func__);
|
L2CAP_TRACE_ERROR ("%s connection rejected due to same BD ADDR", __func__);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user