Commit Graph

152 Commits

Author SHA1 Message Date
Rahul Tank 894c28afe3 fix(protocomm): Add security checks for buffer overflow and incorrect length handling 2025-12-23 18:22:34 +08:00
Mahavir Jain 9ccd0ee52e fix(protocomm): add validation for Security1 client verifier data
Add checks to validate client_verify_data pointer and length before
processing in handle_session_command1. Prevents NULL pointer dereference
when client omits verifier data in Session_Command1, which could cause
device crash during provisioning (remote DoS attack).

We would like to thank Pavel Kohout from Aisle Research for reporting
this vulnerability along with a mitigation strategy.
2025-12-10 14:19:06 +05:30
Rahul Tank 40a5e18e15 fix(nimble): Address compilation issues in nimble examples 2025-10-30 11:36:11 +05:30
wanckl ea03622621 ci(esp32c61): remove c61 support from readme on 5.4 2025-06-17 15:09:40 +08:00
wuzhenghui 33aca83c63 change(ci): remove esp32c5 from readme since esp32c5 skipped CI build 2025-04-25 17:13:27 +08:00
Jiang Jiang Jian b1d0ffba15 Merge branch 'feat/add_protocomm_sec_patch_config_v5.4' into 'release/v5.4'
feat(protocomm): add (hidden) config option to indicate security patch feature (v5.4)

See merge request espressif/esp-idf!37790
2025-03-21 16:54:50 +08:00
Mahavir Jain 291a008840 feat(protocomm): add (hidden) config option to indicate security patch feature 2025-03-17 13:30:45 +05:30
Mahavir Jain 6d749486b9 fix(provisioning): fix incorrect AES-GCM IV usage in security2 scheme
Using same IV in AES-GCM across multiple invocation of
encryption/decryption operations can pose a security risk. It can help
to reveal co-relation between different plaintexts.

This commit introduces a change to use part of IV as a monotonic
counter, which must be incremented after every AES-GCM invocation
on both the client and the device side.

Concept of patch version for a security scheme has been introduced here
which can help to differentiate a protocol behavior for the provisioning
entity. The security patch version will be available in the JSON
response for `proto-ver` endpoint request with the field
`sec_patch_ver`.

Please refer to documentation for more details on the changes required
on the provisioning entity side (e.g., PhoneApps).
2025-03-10 09:29:39 +05:30
Mahavir Jain 2fa5c7d9eb fix(protocomm): memory leak issue for session command0 failure case 2025-03-10 09:29:35 +05:30
Rahul Tank fb55646270 fix(nimble): Add notify characteristic flag support 2024-09-05 16:16:08 +05:30
Rahul Tank 338d9f40d9 fix(wifi_prov): Add support for ESP IP controller chips in bluedroid 2024-08-29 14:56:46 +05:30
shreeyash 6e6fd2f6a3 fix(wifi_prov_mgr): Api to keep BLE on after provisioning 2024-08-13 12:42:35 +05:30
Rahul Tank 35e88684db fix(wifi_prov): Use calloc instead of malloc to zero initialize variable 2024-08-02 10:33:28 +05:30
Rahul Tank 928117e999 fix(wifi_prov): Added API to set random address 2024-07-21 15:37:37 +05:30
wanlei 3cf069c7d8 feat(esp32c61): disable unsupported build test 2024-07-16 16:06:19 +08:00
zhiweijian b9a1756202 fix(ble/bluedroid): Remove BLE functions discard declaration
fix(nt/bluedroid): Split the device name set functions

feat(bt/bluedroid): added APIs to get/set device name on BT GAP side

change(bt/common): Marked some APIs in device module as deprecated

1. esp_bt_dev_set_device_name
2. esp_bt_dev_get_device_name

change(bt/bluedroid): use BT GAP APIs to set/get device name in bluetooth classic examples

change(bt/bluedroid): use BT/BLE GAP APIs to set/get device name in coexist examples
2024-04-18 15:53:54 +08:00
zhiweijian 5725595d84 fix(ble/bluedroid): Remove esp_bluedroid_init() discard declaration 2024-04-18 15:53:30 +08:00
laokaiyao 65b1fd33d3 ci(esp32c5mp): disable the unsupported tests 2024-04-07 12:13:29 +08:00
Laukik Hase 379e02ec9c refactor(protocomm): Make the protocomm proto-c headers public 2024-02-28 14:35:04 +05:30
Marius Vikhammer 1f7c666701 ci(test_apps): limit dependencies for misc test_apps
Only pull in direct dependencies for the test apps, reducing build time
as well making it possible for CI to determine if the test should run or not
when dependencies are changed.
2024-02-18 16:01:58 +08:00
Wang Meng Yang 4c8f6c5458 Merge branch 'feat/add_get_device_name_api' into 'master'
feat(bt/bluedroid): Added API to get local device name

Closes BT-3526

See merge request espressif/esp-idf!27667
2023-12-27 10:37:33 +08:00
Jin Cheng a3f68aef8a feat(bt/bluedroid): Added API to get local device name 2023-12-15 19:30:12 +08:00
Vikram Dattu ec1057a05a fix(esp_srp): Use @file for file documentation and missing doc
Using @brief for file description wrongly associates the documentation to an API.
Correct way to add file description is to use `@file` and then `@brief`. Corrected the same.

- Also added missing doc for esp_srp_handle_t
2023-12-15 12:28:17 +05:30
Vikram Dattu 08f2422ff8 feat(provisioning): Generate Salt and verifier pair for given username and password
This commit adds a new feature to generate a salt and verifier pair for a given username and
password during the provisioning process. This is useful in scenarios where the pairing pin is
randomly generated and shown via some interface such as a display or console.

- Uses the provided username and password to generate a salt and verifier pair
- Adds support for dev mode where the pin/password can still be read from flash
2023-11-21 18:06:24 +05:30
Vikram Dattu b97322c521 refactor(esp_srp): Expose esp_srp.h and add API docs
- Also added missing `protocomm_security2` reference in `protocomm.rst`
2023-11-21 18:06:24 +05:30
Rahul Tank e689cc55d8 Merge branch 'feature/protocomm_update_params' into 'master'
fix(protocomm): added Protocomm BLE Event Structure and Event Handling

See merge request espressif/esp-idf!26707
2023-11-03 14:09:27 +08:00
darshan e1ec13548f fix(protocomm): added Protocomm BLE Event Structure and Event Handling 2023-11-02 15:37:50 +05:30
Jin Cheng fc174f5811 feat(bt/bluedroid): Added mode to use BlueDroid host only without Bluetooth Controller 2023-10-30 00:52:26 +00:00
Zim Kalinowski fa1a3ce0b5 Merge branch 'refactor/components_linux_compatible' into 'master'
Exclude all currently incompatible components from Linux build

Closes IDF-8318 and IDF-5996

See merge request espressif/esp-idf!25598
2023-10-18 20:17:49 +08:00
Jakob Hasse 548022fbe6 refactor(linux): excluded all non-Linux components from build
* All components which won't build (yet) on Linux are excluded.
  This enables switching to Linux in an application without
  explicitly setting COMPONENTS to main in the main
  CMakeLists.txt.
* ESP Timer provides headers for Linux now
* automatically disabling LWIP in Kconfig if it is not available

doc(linux): brought section
  "Component Linux/Mock Support Overview" up to date
2023-10-16 17:06:54 +08:00
Niklas Kaaf 2d6dcee136 fix: "erro code" -> "error code" typos
Closes https://github.com/espressif/esp-idf/pull/12330
2023-10-13 18:13:54 +08:00
WanqQixiang 5435c9b04a fix(protocomm): Remove the configuration check of wifi_provisioning for protocomm component 2023-09-25 15:32:03 +08:00
liqigan 0df585dc35 feat(bt/bluedroid): Add new version of API for Bluedroid host stack initialization 2023-08-31 12:28:38 +00:00
Armando 7dbd3f6909 feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
KonstantinKondrashov e72061695e all: Removes unnecessary newline character in logs
Closes https://github.com/espressif/esp-idf/issues/11465
2023-06-09 03:31:21 +08:00
Laukik Hase f695c1a788 wifi_prov: Exposed events for secure session establishment 2023-05-23 12:00:40 +05:30
isha.pardikar@espressif.com f29430239c wifi_prov_mgr: Fixed memory leak after bluetooth stack was stopping. 2023-04-24 17:45:41 +05:30
Marius Vikhammer 75591a8a13 Merge branch 'ci/driver_single_board' into 'master'
ci: update test apps to use run_all_single_board_cases

See merge request espressif/esp-idf!22669
2023-03-13 09:25:42 +08:00
Marius Vikhammer 0be8e03907 ci: update test apps to use run_all_single_board_cases 2023-03-10 14:27:09 +08:00
isha.pardikar@espressif.com e72d223737 wifi_prov_mgr : Fixed return value of characteristic read operation 2023-03-06 15:23:26 +05:30
Alexey Lapshin a7e51b2509 protocomm: fix gcc-12 compile errors 2023-02-22 05:33:03 +00:00
Omar Chebib 5e5343d429 TWDT: Use the new TWDT Kconfig options in the examples and tests 2023-02-17 11:22:25 +08:00
Rahul Tank 826495a145 Nimble: Added return value (success / failure ) to nimble_port_init 2023-01-31 12:01:02 +05:30
Laukik Hase 7759079362 protocomm: Fix Kconfig dependency on wifi_provisioning component config
- `protocomm` depends on a config option `CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION`
  from `wifi_provisioning`; however, a lower layer component (`protocomm`) should
  not have any `#ifdef` guard dependent on an upper layer component (`wifi_provisioning`).
- Added a new `ble_link_encryption` flag in `protocomm_ble_config_t` to manage the same

Closes https://github.com/espressif/esp-idf/issues/9443
2023-01-20 11:01:01 +05:30
Cao Sen Miao 94120b82c2 esp32h2: add build test 2023-01-17 10:29:04 +08:00
Laukik Hase 68d90dd392 protocomm: Fix test-app build for esp32c2 & esp32c6
- AES context has a breaking change, rather than storing
  round keys directly, it stores the offset at which the keys
  are present in the context buffer
2023-01-09 15:41:36 +05:30
Mahavir Jain 3a56807568 protocomm: remove "Wno-format" cflag and fix formatting errors 2022-12-21 14:13:55 +05:30
Mahavir Jain a2616c0ab5 protocomm: fix multiple coverity warnings
- comparing array with NULL
- dereferencing null pointer
- resource leak
2022-11-08 15:50:42 +05:30
Mahavir Jain 99579620b2 Merge branch 'feature/wifi_prov_event_transport_paired' into 'master'
wifi_prov: Exposed events for transport pairing and disconnection

Closes IDFGH-8557

See merge request espressif/esp-idf!20821
2022-11-01 17:39:28 +08:00
Laukik Hase e6171b7338 wifi_prov: Exposed event for transport pairing
Closes https://github.com/espressif/esp-idf/issues/10007
2022-11-01 10:06:30 +05:30