Zhang Hai Peng
4e9392ecd8
fix(bt/bluedroid): fix BLE SMP pairing failure on BLE-only devices when using default param
...
(cherry picked from commit 74a053bd4e )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-04-09 11:53:18 +08:00
yangfeng
e7d5f1bbe8
fix(bt): avoid deleting device record on partial transport cleanup
2026-04-07 12:03:29 +08:00
Zhi Wei Jian
1a532094a0
fix(ble/bluedroid): Fixed privacy callback triggering multiple times
...
(cherry picked from commit 5272b7e75b )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-04-03 14:02:33 +08:00
Wang Meng Yang
55e88b4e27
Merge branch 'bugfix/improve_spp_hid_v5.2' into 'release/v5.2'
...
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in SPP & HID (v5.2)
See merge request espressif/esp-idf!47148
2026-04-02 14:24:23 +08:00
Island
1e07f40a93
Merge branch 'bugfix/fix_some_bluedroid_bugs_260121_v5.2' into 'release/v5.2'
...
Bugfix/fix some bluedroid bugs 260121 (5.2)
See merge request espressif/esp-idf!46980
2026-04-01 11:45:16 +08:00
zhiweijian
bd3e284921
fix(ble/bluedroid): Fixed bluedrodi CI build error
2026-03-31 14:05:07 +08:00
Jin Cheng
1de651d067
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in SPP
2026-03-30 19:28:45 +08:00
zhiweijian
1321f3355d
fix(ble/bluedroid): optimize bluedroid host and fix GAP, memory, status and BTM API issues
...
- return HCI_ERR_MEMORY_FULL on cmd buffer alloc failure
- remove legacy adv/scan semaphores and mutex
- Use the same legacy gap callback instead of each independent legacy gap event callback
2026-03-30 16:45:03 +08:00
Zhi Wei Jian
aa89634475
fix(ble/bluedroid): Null/range checks, crypto cleanup and API consistency
...
- smp_api.h/smp_int.h: SMP_OPCODE_ARRAY_SIZE and SecureConnectionOobDataReply
declaration alignment
- p_256_ecc_pp/p_256_multprecision: bounds and overflow fixes in ECC/multiprecision
- smp_act: init le_key; p_dev_rec null check in smp_key_distribution;
smp_compute_dhkey failure notify in smp_both_have_public_keys
- smp_api: early state/cb_evt check in SMP_SecureConnectionOobDataReply
- smp_cmac: input/length validation in cmac_aes_k_calculate and
aes_cipher_msg_auth_code
- smp_keys: smp_gen_p2_4_confirm return and smp_calculate_comfirm_cont;
smp_process_private_key/smp_compute_dhkey cleanup and peer_pub_be clear
- smp_l2c: fix callback param types with L2CAP
- smp_main: event/state bounds in smp_sm_event; smp_get_event_name default string
- smp_utils: cmd_code<SMP_OPCODE_ARRAY_SIZE and smp_cmd_build_act check;
smp_mask_enc_key/smp_command_has_invalid_parameters bounds
(cherry picked from commit 50747e4f63 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-03-30 16:45:03 +08:00
Zhi Wei Jian
c89b01c3e5
fix(ble/bluedroid): BLE credit, reject when p_rcb NULL, timeout and leak fixes
...
- l2c_int: align struct/constant types with l2c_ble/l2c_main
- l2c_api: null/state checks in L2CA_SendFixedChnlData
- l2c_ble: reject when p_rcb==NULL, add L2CAP_CMD_BLE_FLOW_CTRL_CREDIT;
l2cble_init_direct_conn int64_t timeout and link_timeout==0 fix
- l2c_link: null/state checks and cleanup in hci_disc_comp/timeout/send_to_lower
- l2c_main: free p_msg on FCR non-Basic and COC branches; fix LE credit handling;
process_l2cap_cmd bounds
- l2c_utils: credit/queue cleanup and null checks in l2cu_disconnect_chnl
(cherry picked from commit 16d523e9bf )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-03-30 16:45:03 +08:00
Zhi Wei Jian
5399361622
fix(ble/bluedroid): Fix double-free, exec write, bounds and HCI param checks
...
- gap_ble: add length/attribute checks in gap_proc_write_req
- gatt_cl: set p_cmd->p_cmd=NULL before memset to avoid double-free;
pending_cl_req %= GATT_CL_MAX_LCB
- gatt_sr: fix exec write zeroed_attrs and offset/len bounds, OOM cleanup
- gatt_sr_hash: null checks for p_attr->p_next, p_data+=2, len==0 in
gatts_calculate_datebase_hash, gatts_show_local_database
- gatt_utils: explicit return NULL, indent, idx<GATT_MAX_APPS checks,
len>GATT_MAX_ATTR_LEN, gatt_cleanup_upon_disc dealloc branch
- hciblecmds: length/handle validation in BLE ext adv/BIG sync HCI commands
(cherry picked from commit 1d31286f1a )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-03-30 16:45:03 +08:00
Zhi Wei Jian
890cbb1d54
fix(ble/bluedroid): Event length checks and timer/alarm error handling
...
- btu_hcif: validate p_msg->len and hci_evt_len in process_event; pass evt_len to
sub-handlers; fix cs_subevt num_steps_reported==0 malloc; bounds in
command_complete and role_change_evt
- btu_task: handle osi_alarm_new/hash_map_set failure in btu_start_timer,
btu_start_quick_timer, btu_start_timer_oneshot
(cherry picked from commit 537661fb2e )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-03-30 16:45:03 +08:00
Zhi Wei Jian
6e56940435
fix(ble/bluedroid): BLE GAP/ACL/ISO/SCO null checks, evt_len and resource handling
...
- btm_acl: malloc/list_append failure handling, remove/memset order in btm_acl_removed
- btm_ble: remove incorrect sec_flags in SMP_OOB/NC/SC_OOB fall-through
- btm_ble_5_gap: btm_ble_hci_status_to_str unreachable return,
BTM_BleSetExtendedAdvParams/BleStartExtAdv leak and bounds
- btm_ble_addr: fix indent in btm_find_dev_by_identity_addr
- btm_ble_gap: null check p_service_data, pass evt_len to btm_ble_process_adv_pkt,
bounds in process_adv_pkt
- btm_ble_iso: align param types with declaration
- btm_ble_privacy: handle BTM_BLE_IRK_LIST_INVALID_INDEX in update_resolving_list,
comment fixes
- btm_devctl: fix btm_vsc_complete param order/type
- btm_sco: add evt_len to btm_sco_process_num_completed_pkts for bounds check
- btm_ble_int.h/btm_int.h: add evt_len to process_adv_pkt and
process_num_completed_pkts declarations
(cherry picked from commit 65b2cb2728 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-03-30 16:45:03 +08:00
Zhi Wei Jian
22b75a0a05
fix(ble/bluedroid): fix L2CAP, SMP and HCI command issues
...
- Fix active_count check in l2cu_ble_plcb_active_count
- Restore previous state if connection command fails
- Fix HCI cmd buffer size off-by-one errors
- Fix connect handle length errors
- Fix channel sounding event status handling
- Fix SMP param_len check in smp_rand_back
- Fix spelling: BROCASTER to BROADCASTER in definitions
(cherry picked from commit e118d053b3 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-03-30 16:45:02 +08:00
Zhi Wei Jian
9501b978b2
fix(ble/bluedroid): fix GAP, advertising and security issues in BTM layer
...
- Fix adv state restore and reset if start/stop failed
- Fix periodic adv v2 event without PAWR feature enabled
- Fix periodic adv sync establish skip handling
- Fix resolving list max_size validation
- Fix RPA addr_type update after host-side resolution
- Fix pairing_state reset if p_dev_rec alloc failed
- Fix ISO cis_cnt limit and ext adv parameter check
- Try to delete smp keys even if not in device list
(cherry picked from commit e0ccc644a8 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-03-30 16:45:02 +08:00
Zhi Wei Jian
9025560b11
fix(ble/bluedroid): fix GATT protocol and database operation issues
...
- Fix GATTC read by type length error and rsp pdu format check
- Fix p_cur_handle update in gatts_db_read_attr_value_by_type
- Fix len calculation error in calculate_database_info_size
- Replace gatt_find_the_connected_bda with p_tcb_list iteration
- Send cmd reject if cid is invalid
- Fix param_len check in smp_rand_back
- Remove duplicate uuid compare functions
(cherry picked from commit 6242e0244c )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-03-30 16:45:02 +08:00
Zhi Wei Jian
278763a883
feat(ble/bluedroid): support adv monitor feature
...
(cherry picked from commit 1566a50929 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-03-26 17:23:39 +08:00
Jin Cheng
c53d05ae52
fix(bt/bluedroid): fixed possible OOB read in avrc_pars_vendor_cmd
2026-03-20 20:03:58 +08:00
yangfeng
d7fc14f15d
feat(bt): Add APIs to control transmit power level
...
- API to read ACL real RSSI
- APIs to read/write tx power of inq/iscan/page/pscan/ACL
2026-03-16 16:00:25 +08:00
Jiang Jiang Jian
588798ecb1
Merge branch 'bugfix/report_hid_close_evt_v5.2' into 'release/v5.2'
...
fix(hid): Fixed HID repeatedly reporting the close event (v5.2)
See merge request espressif/esp-idf!46614
2026-03-16 11:40:48 +08:00
yangfeng
8e5a1ea31d
fix(hid): Fixed HID repeatedly reporting the close event
2026-03-13 16:26:51 +08:00
chenjianhua
e56b4e4a20
feat(ble/bluedroid): Add an API to resolve RPA
2026-03-11 20:12:22 +08:00
Wang Meng Yang
54bcd5b7cc
Merge branch 'bugfix/source_acp_miss_audio_cfg_evt_v5.2' into 'release/v5.2'
...
fix: enhanced packet length check in Bluedroid v5.2
See merge request espressif/esp-idf!45261
2026-02-13 14:02:34 +08:00
Jin Cheng
ac8338f962
fix(bt): enhanced packet length check in sdp_server.c
2026-02-03 14:10:25 +08:00
Jin Cheng
5a43ad6d57
fix(bt): enhanced packet length check for avrc_pars_vendor_cmd
2026-02-03 14:10:25 +08:00
zhiweijian
81b1f1e738
fix(ble/bluedroid): Unify BTM byte alignment
2026-01-30 20:25:11 +08:00
zhiweijian
f2ba0aa3be
feat(ble/bluedroid): Add new bluedroid host examples
2026-01-30 20:24:33 +08:00
Zhou Xiao
8b8b5ab2cb
fix(ble): fixed use-after-free in bluedroid attp
...
(cherry picked from commit 78594e0f6e )
Co-authored-by: Zhou Xiao <zhouxiao@espressif.com >
2026-01-15 19:13:19 +08:00
xiongweichao
ccc3dad9fa
fix(bt): fix l2cap malloc fail in throughput test
2026-01-09 06:02:51 +00:00
Island
2ddc6f0a7c
Merge branch 'bugfix/fix_ble_security_issue_2025_v3_v5.2' into 'release/v5.2'
...
fix(ble/bluedroid): Fix type mismatch and length validation in HCI packet parser (v5.2)
See merge request espressif/esp-idf!44664
2026-01-09 10:24:00 +08:00
zhanghaipeng
fb3549cc8c
feat(ble/bluedroid): add periodic advertising create sync retry mechanism
2026-01-07 19:28:39 +08:00
Zhang Hai Peng
b3e550826f
fix(ble/bluedroid): Fix multiple out-of-bounds read vulnerabilities in GATT PDU handlers
...
(cherry picked from commit 643d9c2387 )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-01-07 19:28:39 +08:00
Zhang Hai Peng
44d1681c25
fix(ble/bluedroid): Fix out-of-bounds read in l2cble_process_sig_cmd
...
(cherry picked from commit 93cfbb8522 )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-01-07 19:28:39 +08:00
Zhang Hai Peng
6ee39ea7ca
fix(ble/bluedroid): Fix integer underflow in gatt_process_read_by_type_rsp
...
(cherry picked from commit 597fc6e5c1 )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-01-07 19:28:39 +08:00
zhiweijian
2f9ca91c58
fix(ble/bluedroid): Fixed bt buuld error
...
fix(ble/bluedroid): disable power management if bt is disabled
2026-01-07 19:21:48 +08:00
Zhi Wei Jian
d595e6a8ba
fix(ble/bluedroid): Fixed bluedroid host get white list size error
...
(cherry picked from commit f4dfd42725 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:40 +08:00
Zhi Wei Jian
8f2b813768
fix(ble/bluedroid): optimize bluedroid host code
...
(cherry picked from commit 3b18da2bde )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:38 +08:00
Zhi Wei Jian
e49a33ff4b
fix(ble/bluedroid): Add BLE_TOPOLOGY_CHECK
...
(cherry picked from commit 728c4c8a10 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:37 +08:00
Zhi Wei Jian
08b81a69d6
fix(ble/bluedroid): disable bluedroid background connection
...
(cherry picked from commit 1f5fa1e72b )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:36 +08:00
Zhi Wei Jian
0ad656285b
fix(ble/bluedroid): change tGATT_BG_CONN_DEV to GATT_BG_CONN_DEV
...
(cherry picked from commit ac7812ef8d )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:36 +08:00
Zhi Wei Jian
17c1a55c05
fix(ble/bluedroid): disable exception list if scan is not enabled
...
(cherry picked from commit ec6809611a )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:36 +08:00
Zhi Wei Jian
f198560f30
fix(ble/bluedroid): disable vendor hci function
...
(cherry picked from commit 715184fa36 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:35 +08:00
Zhi Wei Jian
bc7bac4753
fix(ble/bluedroid): Delete btm_ble_send_extended_scan_params
...
(cherry picked from commit 1174ad41a5 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:35 +08:00
Zhi Wei Jian
a0d982e27f
fix(ble/bluedroid): change bluedroid scan callback name
...
(cherry picked from commit b9440efbe9 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:34 +08:00
Zhi Wei Jian
3a1cc11ee2
fix(bluedroid): delete bluedroid gatt_listen
...
(cherry picked from commit db17c7cea3 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:34 +08:00
Zhi Wei Jian
0f1649d684
fix(ble/bluedroid): Delete observe and inquiry
...
(cherry picked from commit 34448a7455 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:33 +08:00
Zhi Wei Jian
1859c2f9a0
fix(ble/bluedroid): delete bluedroid unused code
...
(cherry picked from commit 5145b366f7 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:28 +08:00
Zhi Wei Jian
ba34f83b8c
fix(ble/bluedroid): Delete batch_scan related code
...
(cherry picked from commit a784adef00 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:27 +08:00
Zhi Wei Jian
d2569f7662
fix(ble/bluedroid): Delete BLE_HOST_SETUP_STORAGE_EN
...
(cherry picked from commit 08740df988 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:27 +08:00
Zhi Wei Jian
f5f0e8cb65
fix(ble/bluedroid): Delete BLE_HOST_READ_TX_POWER_EN
...
(cherry picked from commit 1c0c48b814 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-01-07 17:23:26 +08:00