Commit Graph
723 Commits
Author SHA1 Message Date
Jin Cheng d6a49aedef fix(bt/bluedroid): added validation for all SMP BR opcode lengths in smp_br_data_received 2026-06-09 17:11:08 +08:00
yangfeng 6028243598 fix: Fix missing handling for HCI_ERR_CONNECTION_EXISTS
- Closes https://github.com/espressif/esp-idf/issues/18562
2026-06-04 19:13:38 +08:00
Island f17466af04 Merge branch 'opt/optimize_ble_document' into 'master'
Opt/optimize ble document

Closes BLERP-2844

See merge request espressif/esp-idf!48819
2026-06-01 19:23:27 +08:00
zhanghaipeng 1a9f2af505 feat(ble/bluedroid): add auto-setting for is_aux parameter in esp_ble_gattc_enh_open 2026-05-29 10:16:21 +08:00
zhiweijian c9d13aaf64 fix(ble/bluedroid): fix HCI command and BTU robustness 2026-05-29 10:15:11 +08:00
zhiweijian 54a1e31916 fix(ble/bluedroid): fix GATT server lifecycle and callbacks 2026-05-29 10:15:02 +08:00
zhiweijian b3ff15ed31 fix(ble/bluedroid): fix GATT client cache and service discovery 2026-05-29 10:14:46 +08:00
zhiweijian e3311c81c4 fix(ble/bluedroid): fix GAP BLE API parameter validation 2026-05-29 10:14:42 +08:00
zhanghaipeng 519131a671 fix(bluedroid): correct format specifier in BLE create CIS debug log 2026-05-12 15:45:41 +08:00
Island 5a4e10c5e8 Merge branch 'bugfix/fix_ble_min_conn_interval' into 'master'
fix(ble): Optimize connection interval minimum parameter check

Closes BLERP-2748

See merge request espressif/esp-idf!48116
2026-05-11 10:31:03 +08:00
Jiang Jiang Jian 7e05593bde Merge branch 'feat/a2dp_support_other_codec' into 'master'
feat(bt): Support AAC codec for A2DP

Closes BT-3411, IDFGH-17176, and IDFGH-10920

See merge request espressif/esp-idf!47879
2026-05-07 20:52:37 +08:00
yangfeng 84bdfef5cf feat(bt): Support AAC codec for A2DP
- Allow multiple registrations of SEP
- Add a callback event to report the sep information of A2DP sink
- Closes https://github.com/espressif/esp-idf/issues/12114
- Closes https://github.com/espressif/esp-idf/issues/18184
2026-05-07 17:11:57 +08:00
Jin Cheng af9ec3cd58 fix(bt/bluedroid): fixed the vulerabilities from AI code review in Bluedroid 2026-05-06 18:05:14 +08:00
zhanghaipeng 102a899d23 fix(ble): Optimize connection interval minimum parameter check 2026-04-30 10:55:30 +08:00
zhanghaipeng 658ff8730b fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(2f683593)
- Fixed read remote feature timeout when using coded phy
- Fixed disconnection issue(0x08) when using 125k coded phy
- Fixed disconnection issue(0x08) when updating connection param
- Fixed disconnection issue(0x08) when using multi connection
- Avoid error when adding duplicate device to whitelist
- Support disable channel assessment by vendor hci
- Support smaller connection interval (3.75 ms)
- Support duplicate exception list in EVT ADV
2026-04-28 18:26:22 +08:00
Island 05e61fe765 Merge branch 'feat/support_ble_iso_coex' into 'master'
Support blufi on esp32s31

Closes BT-4318

See merge request espressif/esp-idf!47861
2026-04-27 16:18:11 +08:00
Island 1c8b737ba1 Merge branch 'fix/fix_blufi_memory_copy_len_error' into 'master'
fix(ble): Fix blufi fragment reassembly bounds and buffer overflows

See merge request espressif/esp-idf!47090
2026-04-27 15:38:23 +08:00
zhiweijian 666c1894c5 fix(ble/bluedroid): Fixed init crash when bluedroid BLE is enabled in BREDR only mode 2026-04-27 11:47:23 +08:00
zhiweijian 94f0c1837a fix(ble): Fixed AI review bugs in bt common 2026-04-23 17:44:21 +08:00
Wang Meng Yang 29f1e572b1 Merge branch 'bugfix/spp_enhancement' into 'master'
fix(bt/bluedroid): fixed the vulnerabilities from AI code review in SPP

Closes BT-4280

See merge request espressif/esp-idf!47114
2026-04-23 11:17:23 +08:00
yangfeng 63f04b97f2 fix(bt): fix A2DP stack component issues reported by AI review 2026-04-16 17:06:03 +08:00
yangfeng d997218dbc fix(bt): fix AVRCP component issues reported by AI review 2026-04-14 14:34:30 +08:00
Island d227dc7f23 Merge branch 'bugfix/fix_privacy_callback_trigger_multipe_times' into 'master'
Bugfix/fix privacy callback trigger multiple times

See merge request espressif/esp-idf!47205
2026-04-03 20:35:47 +08:00
Wang Meng Yang bb597ede48 Merge branch 'bugfix/btm_sec_free_dev' into 'master'
fix(bt): avoid deleting device record on partial transport cleanup

Closes BT-4248

See merge request espressif/esp-idf!45753
2026-04-03 19:18:13 +08:00
zhiweijian 5272b7e75b fix(ble/bluedroid): Fixed privacy callback triggering multiple times 2026-04-01 21:02:45 +08:00
zhanghaipeng 74a053bd4e fix(bt/bluedroid): fix BLE SMP pairing failure on BLE-only devices when using default param 2026-04-01 12:10:16 +08:00
yangfeng 0e9d642d74 fix(bt): avoid deleting device record on partial transport cleanup 2026-04-01 10:02:26 +08:00
Wang Meng Yang 4cac5e157a Merge branch 'bugfix/misc_improvement' into 'master'
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in Bluedroid

See merge request espressif/esp-idf!46833
2026-03-31 09:55:29 +08:00
Jin Cheng ed270d71c8 fix(bt/bluedroid): fixed the vulerabilities from AI code review in SPP 2026-03-30 17:38:46 +08:00
Jin Cheng 6702e66dd8 fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in Bluedroid 2026-03-27 11:28:37 +08:00
Wang Meng Yang d9a53ecebe Merge branch 'bugfix/spp_improvement' into 'master'
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in SPP

See merge request espressif/esp-idf!46803
2026-03-27 10:41:51 +08:00
zhiweijian 1566a50929 feat(ble/bluedroid): support adv monitor feature 2026-03-23 17:28:40 +08:00
Island 1c99ea52c1 Merge branch 'bugfix/optimize_bluedroid_host_code_new' into 'master'
fix(ble/bluedroid): Use the same legacy gap callback instead of each independent legacy gap event callback

Closes BLERP-2639

See merge request espressif/esp-idf!46344
2026-03-23 15:28:46 +08:00
Jin Cheng dba6432d81 fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in SPP 2026-03-23 11:22:06 +08:00
Jiang Jiang Jian 9bde023b12 Merge branch 'bugfix/oob_in_avrc' into 'master'
FIx: Heap OOB read in Bluedroid AVRCP Target parser

Closes BT-4269

See merge request espressif/esp-idf!46425
2026-03-20 17:41:11 +08:00
zhiweijian d07ce78dcf 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-19 20:59:28 +08:00
zhiweijian 50747e4f63 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
2026-03-18 16:49:09 +08:00
zhiweijian 16d523e9bf 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
2026-03-18 16:49:09 +08:00
zhiweijian 1d31286f1a 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
2026-03-18 16:38:25 +08:00
zhiweijian 537661fb2e 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
2026-03-18 16:38:25 +08:00
zhiweijian 65b2cb2728 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
2026-03-18 16:38:24 +08:00
Wang Meng Yang c941926ee7 Merge branch 'feat/bt_distance_test' into 'master'
feat(bt): Add APIs to read ACL real RSSI and read/write tx power of inq/iscan/page/pscan/ACL

Closes BT-4155

See merge request espressif/esp-idf!45601
2026-03-16 15:09:19 +08:00
yangfeng 7a0771d2c8 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-13 10:12:40 +08:00
yangfeng cf554d6d61 fix(hid): Fixed HID repeatedly reporting the close event 2026-03-13 09:45:14 +08:00
Jin Cheng 60f9362f83 fix(bt/bluedroid): fixed possible OOB read in avrc_pars_vendor_cmd 2026-03-10 08:43:56 +08:00
zhiweijian ba0537c118 fix(ble/bluedroid): Fixed read or write failed if SMP is disabled 2026-03-02 18:32:20 +08:00
zhiweijian e118d053b3 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
2026-02-27 17:59:59 +08:00
zhiweijian e0ccc644a8 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
2026-02-27 17:59:46 +08:00
zhiweijian 6242e0244c 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
2026-02-27 17:59:35 +08:00
chenjianhua 7c51dbc350 feat(ble/bluedroid): Add an API to resolve RPA 2026-02-09 00:05:10 +08:00