Zhi Wei Jian
49cddfd411
feat(ble/bluedroid): Support PAWR connection event
...
(cherry picked from commit 7da7fa42ac )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-08-03 15:25:53 +08:00
Jin Cheng
6e4bd4152d
fix(bt/bluedroid): fixed incorrect eSCO packet type validation under secure connection mode in BlueDroid
2026-07-29 17:30:25 +08:00
hejiaxin
60289a9c60
fix(bt): Fix some bug in stm_sco.c
...
- Memory safety
- State machine & logic integrity
- Resource leaks
- Edge cases check
2026-07-29 17:30:25 +08:00
Island
5f29e3e2e1
Merge branch 'fix/ble_hidd_remove_ccc_gating_v5.5' into 'release/v5.5'
...
fix(esp_hid/bluedroid): remove app-layer CCC gating in HID device (5.5)
See merge request espressif/esp-idf!51006
2026-07-23 19:26:08 +08:00
Wang Meng Yang
7bf2026549
Merge branch 'bugfix/bredr_critical_bugs_v5.5' into 'release/v5.5'
...
fix(bt/bluedroid): fixed issues from AI review in GAP, SPP, HID, L2CAP and HCI (v5.5)
See merge request espressif/esp-idf!51079
2026-07-23 16:45:34 +08:00
Jin Cheng
b7ccc6e9ed
fix(bt/bluedroid): fixed issues from AI review in GAP, SPP, HID, L2CAP and HCI
2026-07-23 07:50:26 +08:00
Zhang Hai Peng
fb7e051f97
fix(ble/bluedroid): track ext scan state for rand addr check
...
Update inq_var.state only after btsnd_hcic_ble_ext_scan_enable succeeds.
Clear BTM_BLE_SCANNING on explicit stop and controller scan timeout.
(cherry picked from commit 23519567e4 )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-07-21 10:53:25 +08:00
Zhi Wei Jian
7ab919a76e
feat(ble/bluedroid): Support bluedroid dual identity
...
(cherry picked from commit 2358786647 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:32:11 +08:00
Zhi Wei Jian
11a1a33e26
fix(ble/bluedroid): use BOOLEAN for BLE HCI command builders
...
(cherry picked from commit abbf001120 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:28:30 +08:00
Zhi Wei Jian
f4650eb7c0
fix(ble/bluedroid): clean up LE CoC connect on CCB alloc failure
...
(cherry picked from commit 4fd1ebb4a9 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:28:23 +08:00
Zhi Wei Jian
e97d59c545
docs(ble/bluedroid): note ISO BIG HCI alloc failure not checked
...
(cherry picked from commit 34b59d30ae )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:28:15 +08:00
Zhi Wei Jian
932da59cb4
fix(ble/bluedroid): fix direct-connect cleanup and adv bounds
...
(cherry picked from commit 82e71c1767 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:28:07 +08:00
Zhi Wei Jian
f006758550
fix(ble/bluedroid): validate BLE confirm/OOB and sec-check device
...
(cherry picked from commit 93ab11d564 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:28:00 +08:00
Zhi Wei Jian
0314335eb6
fix(ble/bluedroid): validate SMP pair-fail reason and OOB device
...
(cherry picked from commit 98efe02385 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:27:52 +08:00
Zhi Wei Jian
91b305b663
fix(ble/bluedroid): route ATT indication-conf timeout separately
...
(cherry picked from commit 6c3267ee84 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:27:44 +08:00
Zhi Wei Jian
111c68776d
fix(ble/bluedroid): validate ATT PDU sizes
...
(cherry picked from commit bb00b9817d )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:27:33 +08:00
Zhi Wei Jian
8eb01128f8
fix(ble/bluedroid): re-lookup GATT TCB after enc-complete callback
...
(cherry picked from commit 37562af0ea )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:27:25 +08:00
Zhi Wei Jian
30a8c37942
fix(ble/bluedroid): fix GATT long read and Service Changed CCC
...
(cherry picked from commit 4ce692ac0c )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:27:17 +08:00
Zhi Wei Jian
e35311d351
fix(ble/bluedroid): validate GATT client discovery handles
...
(cherry picked from commit ac35ae6f2d )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:27:05 +08:00
Zhi Wei Jian
7c850b6031
fix(ble/bluedroid): cap Read By Type length and free failed service decl
...
(cherry picked from commit 27ff0cf8c7 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:26:56 +08:00
Zhi Wei Jian
ff3f650a10
fix(ble/bluedroid): guard GATT database hash and serialization
...
(cherry picked from commit 995c1508e8 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:26:44 +08:00
Zhi Wei Jian
6db42b6334
fix(ble/bluedroid): fix GATT server busy errors and sr_cmd handling
...
(cherry picked from commit f86739b03d )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:26:35 +08:00
Zhi Wei Jian
4779dec633
fix(ble/bluedroid): fix GATT teardown and service-change flow
...
(cherry picked from commit 0645ba469d )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:26:27 +08:00
Zhi Wei Jian
b1b015187f
fix(ble/bluedroid): fix GATT service lifecycle leaks
...
(cherry picked from commit ac93d94958 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:26:19 +08:00
Zhi Wei Jian
0eccb599fe
fix(ble/bluedroid): add GATT resource-cleanup helpers
...
(cherry picked from commit b83327f3ca )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:26:11 +08:00
Zhi Wei Jian
c055e45c8f
feat(ble/bluedroid): Support bluedroid LE COC and EATT features
...
(cherry picked from commit 83f0831c53 )
Co-authored-by: zhiweijian <zhiweijian@espressif.com >
2026-07-21 10:25:58 +08:00
Island
0196f65f01
Merge branch 'bugfix/fix_bluedroid_static_random_conn_rpa_v5.5' into 'release/v5.5'
...
fix(ble/bluedroid): skip identity conversion for static random direct connect (5.5)
See merge request espressif/esp-idf!50084
2026-07-20 21:39:24 +08:00
Island
12ac2416be
Merge branch 'feat/add_ble_core_6x_feature_for_bluedroid_v5.5' into 'release/v5.5'
...
Feat/add ble core 6x feature for bluedroid (5.5)
See merge request espressif/esp-idf!50052
2026-07-20 15:05:36 +08:00
Wang Meng Yang
ee9e08ddd9
Merge branch 'bugfix/bug_bounty_av_v5.5' into 'release/v5.5'
...
fix(bt/bluedroid): Fix bug bounty issues about A/V from NVIDIA (v5.5)
See merge request espressif/esp-idf!50478
2026-07-20 14:56:39 +08:00
Wang Meng Yang
839df7e697
Merge branch 'bugfix/avrc_ca_attr_id_check_v5.5' into 'release/v5.5'
...
fix(bt): Fix the validation of AVRCP metadata attr_id in handle_rc_attributes_rsp (v5.5)
See merge request espressif/esp-idf!50551
2026-07-20 14:56:06 +08:00
Wang Meng Yang
31e6b62389
Merge branch 'bugfix/ai_review_avrcp_v5.5' into 'release/v5.5'
...
fix(bt): Fix the critical and high issues related to AVRCP from AI review report (v5.5)
See merge request espressif/esp-idf!50021
2026-07-20 09:06:53 +08:00
Wang Meng Yang
eae640068e
Merge branch 'bugfix/ai_review_btu_common_v5.5' into 'release/v5.5'
...
fix: Fix the critical issues of btu and bt_common from AI review report (v5.5)
See merge request espressif/esp-idf!50123
2026-07-20 09:05:33 +08:00
Wang Meng Yang
071970e478
Merge branch 'bugfix/smp_sec_flags_v5.5' into 'release/v5.5'
...
fix(bt/bluedroid): fixed several security issues from NVIDIA (v5.5)
See merge request espressif/esp-idf!50567
2026-07-19 13:16:19 +08:00
Wang Meng Yang
df95e83bfa
Merge branch 'bugfix/bbp_issues_v5.5' into 'release/v5.5'
...
Bugfix/bbp issues v5.5
See merge request espressif/esp-idf!50190
2026-07-19 12:46:06 +08:00
yangfeng
b7d0ef96a7
fix(bt/bluedroid): Fix unchecked p_ctrl_cback and p_msg_cback in AVRC
...
Closes SEC-1186
2026-07-19 10:10:59 +08:00
yangfeng
31d51adf4f
fix(bt/bluedroid): Fix missing NULL check on p_cfg in AVDT_ReconfigReq
...
Closes SEC-1187
2026-07-19 10:10:59 +08:00
yangfeng
b195d90679
fix(bt): Fix the validation of AVRCP metadata attr_id in handle_rc_attributes_rsp
2026-07-19 10:08:59 +08:00
linruihao
817d132ed0
fix(bt/bluedroid): fix crash during bredr inquiry when zero-addr device is found
2026-07-17 10:39:24 +08:00
zhanghaipeng
7f60576477
fix(ble/bluedroid): match read-multiple responses by handle
...
Read Multiple may mix stack auto-responses with app async responses,
so multi_rsp_q order can differ from the request handle order. Look up
each response by handle (with occurrence for duplicates) instead of
walking the queue by index, and treat opcode-only buffers as empty.
2026-07-15 15:48:46 +08:00
zhanghaipeng
e76bd7359c
fix(ble/bluedroid): match read-multiple-var responses by handle
2026-07-15 15:48:46 +08:00
zhanghaipeng
11bdcf8294
fix(ble/bluedroid): use sr_cmd status for GATT server error rsp
...
When sending an ATT error response after a failed server operation,
use p_tcb->sr_cmd.status instead of the last app callback status so
invalid error code 0x00 is not sent to the peer.
2026-07-15 15:48:46 +08:00
zhanghaipeng
0e6508a8fc
fix(ble/bluedroid): reject invalid ATT error code 0x00 on client
...
Map received error reason 0x00 to GATT_UNKNOWN_ERROR so the client
does not report GATT_SUCCESS with zero-length data on malformed errors.
2026-07-15 15:48:46 +08:00
zhanghaipeng
f6f289689a
fix(ble/bluedroid): preserve ext adv state when set params fails
...
Only update extend_adv_cb after HCI Set Extended Advertising
Parameters succeeds, so a failed update does not corrupt cached
legacy_pdu and related fields used by adv data validation.
2026-07-15 15:48:46 +08:00
zhanghaipeng
1dffcb5560
fix(ble/bluedroid): downgrade numeric comparison log to warning
2026-07-15 15:48:46 +08:00
Zhang Hai Peng
01d1dd63bf
fix(ble/bluedroid): preserve HCI status on BLE 4.2 GAP failures
...
Return BTM_HCI_ERROR | hci_status from legacy BLE 4.2 GAP HCI command
paths instead of mapping failures to BTM_ILLEGAL_VALUE or
BTM_NO_RESOURCES. Add btm_ble_status_from_hci() helper and propagate
real status through scan start/stop completion callbacks.
(cherry picked from commit 47dd785a18 )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-07-15 15:48:46 +08:00
Zhang Hai Peng
f81903c050
feat(ble/bluedroid): Optimize Bluedroid memory usage
...
- Delete unused device records (~356B each)
(cherry picked from commit 7d1c0e9a32 )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-07-15 15:48:46 +08:00
Zhang Hai Peng
ff703331ef
fix(ble/bluedroid): cap Read By Type response length at ATT maximum
...
Read By Type Response Length is one octet (max 255). When MTU was
large enough to return a long characteristic value in one pair, the
server wrote (UINT8)(value_len + 2) and overflowed (e.g. 513 -> 1),
so the client rejected the PDU as GATT_INVALID_PDU (0x04).
Cap server value to 253 bytes per pair, clamp the length byte, and
continue long reads via Read Blob when the capped size is returned.
(cherry picked from commit 97905afccc )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-07-15 15:48:46 +08:00
Zhang Hai Peng
9da5a3a312
fix(ble/bluedroid): Fixed potential double Execute Write Response
...
(cherry picked from commit 0a93ccd3b3 )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-07-15 15:48:46 +08:00
Zhang Hai Peng
bf03277906
fix(ble/bluedroid): unblock sync HCI cmd on Command Status error
...
Release the BLE sync semaphore and record HCI status when a
synchronous command is rejected via Command Status, since no
Command Complete event follows.
(cherry picked from commit 29ae92f4ef )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-07-15 15:48:46 +08:00
Zhang Hai Peng
f789848cc5
fix(ble/bluedroid): report conn param update failure for unknown BD_ADDR
...
Route unknown BD_ADDR and other immediate failures through the existing
need_cb path so ESP_GAP_BLE_UPDATE_CONN_PARAMS_EVT is always delivered.
(cherry picked from commit f9eaeb5e84 )
Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com >
2026-07-15 15:48:46 +08:00