Commit Graph
53252 Commits
Author SHA1 Message Date
Sarvesh Bodakhe 2d1b163e5e refactor(nan): drop commented-out debug logging
Remove the dead commented-out ESP_LOGI debug prints flagged in review: the
"Sent Publish to Peer" line in nan_app.c, and the SCIA-construct,
CSIA-construct and CSIA-len-getter blocks in nan_security.c.
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe 461d9231d3 fix(nan): pass no event payload to NAN netif bring-up action
The NAN-started handler brought the netif up via esp_netif_action_connected()
using the NAN-started event's base/event_id/data. Feeding a "connected"
action from a "started" event and handing it an unrelated event payload is
fragile: it would misbehave if the action handler ever interpreted data
(which is not a wifi_event_sta_connected_t here).

esp_netif_up() is private to the esp_netif component, so keep the public
esp_netif_action_connected() but pass NULL base, 0 event_id, NULL data. This
is safe because the NAN netif is not a DHCP client: the handler only calls
esp_netif_up() and never reads the event args.
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe 07892c59db fix(nan): restore SCIA length getter debug log
The MR had turned the active ESP_LOGD("GET SCIA LEN") into a commented-out
ESP_LOGI. Restore the original ESP_LOGD so the log stays live at DEBUG and
no dead commented code is left behind.
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe 9325ffbea0 fix(nan): source group_mgmt_prot from start config, not blob read-back
esp_nan_action_start() read group_mgmt_prot back from the blob via
esp_wifi_get_config() and defaulted to true when the read failed, which
force-enabled device-global IGTK/BIGTK (BIP beacons, forced GTKSA) on a
path where the user's intent is unknown. group_mgmt_prot is a pure
pass-through user flag, so capture it directly into s_nan_ctx from the
config in esp_wifi_nan_sync_start() (next to use_nvs_for_caching) and drop
the read-back and its ambiguous default. Behaviour now follows the user's
config exactly (default false via WIFI_NAN_SYNC_CONFIG_DEFAULT).
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe a08ad13fd1 fix(nan): set group_mgmt_prot in WIFI_NAN_SYNC_CONFIG_DEFAULT
The default initializer explicitly sets every other bool field but omitted
the new group_mgmt_prot, leaving the intended default ambiguous. Set it to
false so the macro stays exhaustive; both example apps use it.
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe 96a421e851 fix(nan): clear group keys on NAN stop and peer NDP teardown
Fix group-key lifecycle gaps on the secured NDP path:

- On NAN stop, reset the device-global IGTK/BIGTK state via new
  nan_security_reset_own_group_keys() so the next start regenerates fresh
  keys. Previously the one-shot nan_ensure_own_igtk/bigtk kept own_*_set,
  so restart re-installed the stale key with IPN/BIPN=0, resetting the
  blob's monotonic replay counter (and reusing keys if the NMI changed).

- On peer teardown (nan_app_clear_one_peer_tks), remove the peer RX
  IGTK/BIGTK from the blob (they were installed against the peer NMI at
  NDP confirm) and scrub ndl->igtk/bigtk + flags. Previously only the GTK
  was removed, leaving stale BIP keys installed and key bytes in memory.

- Copy the GTK Key RSC into the descriptor only when a GTK KDE is present,
  matching the comment and avoiding stale RSC on an IGTK/BIGTK-only path.
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe c64ec928f4 fix(nan): scrub group keys from stack, demote key hexdumps to DEBUG
Harden group-key material handling on the secured NDP path:

- Zero the stack buffers that hold plaintext/decrypted group keys before
  they leave scope: pad in nan_kek_wrap_key_data, plain in
  nan_append_own_group_kdes (single-exit cleanup), and the decrypted plain
  in esp_nan_parse_ndp_key_desc. Mirrors the existing forced_memzero(pmk)
  scrubs so GTK/IGTK/BIGTK bytes do not persist on the stack.

- Demote the ND-TK / GTK / IGTK / BIGTK ESP_LOG_BUFFER_HEXDUMP calls (own
  keys in nan_security.c, pairwise and peer keys in nan_app.c) from
  ESP_LOG_INFO to ESP_LOG_DEBUG so raw key bytes are not printed at the
  default log level.
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe f50ba727d1 fix(nan): detect ND-TK install failure at NDP confirm
The ND-TK (pairwise data key) install return value was overwritten by the
subsequent NM-TK install before being checked, so an ND-TK failure went
undetected: the NDP was marked accepted and NDP_CONFIRM posted while
unicast data frames had no encryption key installed. Check ND-TK first
and tear down on failure, then install and check NM-TK separately.
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe f2cf9d7486 fix(nan): free NDL slot and deny peer when get_mac fails on NDP resp
The NDP indication handler recorded an NDL slot, then on esp_wifi_get_mac
failure unlocked and returned without releasing the slot or answering the
peer: the slot leaked (counting against the NDL limit) and the peer waited
indefinitely. On failure now reset the NDL and send a deny response,
mirroring the existing allocation-failure cleanup path.

Also drop the redundant pre-branch get_mac/IPv6-derive: its result was
only used on the auto-response path, which recomputes it, so on the
indication path it was dead work and a second leak site.
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe 12a3342415 fix(wifi): sync wifi-remote injected header for NAN group_mgmt_prot 2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe added3a060 feat(nan): pin datapath IPv6 neighbor via esp_netif static entry
- Add esp_wifi_netif_set_static_neighbor() that to add/remove IPv6
  static entry using netif API to skip Neighbor Discovery Protocol
- Move the fe80::/64 + EUI-64 derivation to esp_wifi_netif.c
2026-07-04 00:05:20 +08:00
Sarvesh Bodakhe 310b3d6571 feat(wifi): add NAN group data and management frame protection
Add Wi-Fi Aware group-key support to secured NDPs so group-addressed
traffic can be protected, for interop with iOS/macOS peers:

- GTK (NCS-GTK-CCM-128) protects group-addressed data.
- IGTK/BIGTK (BIP) protect group management traffic - multicast SDFs,
  Beacons.

Capabilities are advertised in the CSIA IE: group_data_prot maps to GTKSA,
group_mgmt_prot to IGTKSA/BIGTKSA. The CSIA cannot encode IGTK/BIGTK
without GTK (WiFi Aware spec 9.5.21.2, Table 122), so enabling group_mgmt_prot
forces group_data_prot on for every secured service.

Expose per-service group_data_prot and device-global group_mgmt_prot.
2026-07-04 00:05:20 +08:00
akshat cd16349be9 bugfix(wifi): Clear Sta TX queue to prevent key 2 send failure
Also, Ensure correct return values for key 2 and key 4.
2026-07-04 00:05:20 +08:00
Nachiket Kukade 3d30b471c6 bugfix(nan): Fix hard/soft reset cases in NAN Pairing verification
- Update pairing complete API to record for peer
- Terminate NAN Datapaths using publish_id after receiving PASN M1
2026-07-04 00:05:20 +08:00
Sajia bf5907d066 feat(nan): Add support for NAN Pairing Verification
- Add nira attr and verification for pasn auth frames
- Refine key clearing and pairing complete logic for pasn verify
- Add NIRA own-service resolution, cached NIK checks, and dynamic
  pairing IE construction for bootstrap vs verify paths.
- Replace NAN bootstrap events by private callbacks
2026-07-04 00:05:20 +08:00
Akshat Agrawal 0d8cb4445d fix(nan): Move the required variables under the NAN_SYNC block 2026-07-04 00:05:20 +08:00
Jiang Jiang Jian 6d021fcbce Merge branch 'task/buildv2_shim_and_ci_v6.1' into 'release/v6.1'
feat(cmakev2): IDF_BUILD_V2 shim + v1-compat layer + buildv2 CI (v6.1)

See merge request espressif/esp-idf!49725
2026-07-03 23:37:50 +08:00
Jiang Jiang Jian edeec716c4 Merge branch 'fix/fix_sleep_cache_writeback_logic_v6.1' into 'release/v6.1'
fix(esp_hw_support): fix esp32s31 sleeping cache writeback logic (v6.1)

See merge request espressif/esp-idf!50347
2026-07-03 22:23:20 +08:00
Jiang Jiang Jian 07c6d5eacf Merge branch 'change/ble_update_lib_20260610_v6.1' into 'release/v6.1'
change(ble): [AUTO_MR] 20260610 - Update ESP BLE Controller Lib (6.1)

See merge request espressif/esp-idf!50227
2026-07-03 21:52:31 +08:00
Jiang Jiang Jian d6d41b0215 Merge branch 'feat/support_esp32s31_icg_control_v6.1' into 'release/v6.1'
feat(esp_hw_support): support PMU clock ICG management for esp32s31 (v6.1)

See merge request espressif/esp-idf!50107
2026-07-03 21:45:42 +08:00
Jiang Jiang Jian 6b557407ab Merge branch 'fix/lp-core-rc-fast-delay_v6.1' into 'release/v6.1'
fix(ulp): use SoC RC_FAST frequency for LP core delay (v6.1)

See merge request espressif/esp-idf!49857
2026-07-03 21:42:19 +08:00
Jiang Jiang Jian a6f24da33e Merge branch 'bugfix/mbedtls_rsa_base_reduction_hw_crt_v6.1' into 'release/v6.1'
fix(mbedlts): Enable hardware CRT for RSA-4096 via base reduction (v6.1)

See merge request espressif/esp-idf!49849
2026-07-03 21:42:10 +08:00
Jiang Jiang Jian fec9fafc0a Merge branch 'bugfix/ulp_lp_core_wakeup_race_v6.1' into 'release/v6.1'
fix(ulp): fix LP core wakeup race with LP timer (v6.1)

See merge request espressif/esp-idf!49561
2026-07-03 21:35:44 +08:00
Jiang Jiang Jian ed3d9f9c46 Merge branch 'bugfix/hfp_example_ci_v6.1' into 'release/v6.1'
fix: Fix the HFP example fails to discovery target device (v6.1)

See merge request espressif/esp-idf!50288
2026-07-03 20:30:56 +08:00
Jiang Jiang Jian d35c053e92 Merge branch 'idf/ble_iso_sec_fixes_v6.1' into 'release/v6.1'
Idf/ble iso sec fixes (v6.1)

See merge request espressif/esp-idf!50231
2026-07-03 20:30:21 +08:00
Jiang Jiang Jian 25c546c1a8 Merge branch 'bugfix/bbp_issues_v6.1' into 'release/v6.1'
Bugfix/bbp issues v6.1

See merge request espressif/esp-idf!50188
2026-07-03 20:29:55 +08:00
Jiang Jiang Jian 7089584a34 Merge branch 'idf/ble_audio_4.4.1_v6.1' into 'release/v6.1'
feat(ble_audio): Support Zephyr LE Audio v4.4.1 (v6.1)

See merge request espressif/esp-idf!50187
2026-07-03 20:28:32 +08:00
Jiang Jiang Jian 2a0dd1921c Merge branch 'contrib/github_pr_18761_v6.1' into 'release/v6.1'
fix(nimble): initialize return value in LED characteristic access cal… (GitHub PR) (v6.1)

See merge request espressif/esp-idf!50150
2026-07-03 20:28:07 +08:00
Jiang Jiang Jian 1bb775f2f1 Merge branch 'fix/lp_core_noreset_under_debug_option_v6.1' into 'release/v6.1'
fix(lp_core): fix build for CONFIG_ULP_NORESET_UNDER_DEBUG=n (v6.1)

See merge request espressif/esp-idf!49866
2026-07-03 20:26:21 +08:00
Jiang Jiang Jian 4c12113aff Merge branch 'backport/49647-v6.1' into 'release/v6.1'
ci: fix pytest markers (backport v6.1)

See merge request espressif/esp-idf!49691
2026-07-03 20:24:16 +08:00
Jiang Jiang Jian 8c79d4b970 Merge branch 'contrib/github_pr_18400_v6.1' into 'release/v6.1'
Improve logging for VFS start_select function (GitHub PR) (v6.1)

See merge request espressif/esp-idf!49549
2026-07-03 20:22:40 +08:00
Jiang Jiang Jian 481813fcd8 Merge branch 'fix/newlib-nano-nosys-linking_v6.1' into 'release/v6.1'
fix(libc): nano: add -lnosys to linking to avoid CMake configuration issues (v6.1)

See merge request espressif/esp-idf!49377
2026-07-03 20:22:23 +08:00
Jiang Jiang Jian 901b57c86c Merge branch 'feature/added_qa_related_vs_cmd_v6.1' into 'release/v6.1'
feat(ble): Updated libble to 6bbfb64 on ESP32-S31 and ESP32-H4 (6.1)

See merge request espressif/esp-idf!50270
2026-07-03 20:02:49 +08:00
wuzhenghui 3f2d963d47 fix(esp_hw_support): fix esp32s31 sleeping cache writeback logic 2026-07-03 19:13:25 +08:00
Jiang Jiang Jian f89374f464 Merge branch 'lwip/dns_stack_corruption_fix_v6.1' into 'release/v6.1'
fix(dns): Added addr_cnt to DNS resolution to fix multi-IP buffer overflow (v6.1)

See merge request espressif/esp-idf!49191
2026-07-03 18:47:11 +08:00
Jiang Jiang Jian b7193c70e1 Merge branch 'feat/refactor_stdio_vfs_v6.1' into 'release/v6.1'
feat(storage/stdio): refactor stdio vfs (v6.1)

See merge request espressif/esp-idf!48957
2026-07-03 17:47:31 +08:00
Jiang Jiang Jian e3feb73053 Merge branch 'task/buildv2_hygiene_and_dep_declarations_v6.1' into 'release/v6.1'
fix(components): generic dep-declaration and scope-leakage hygiene exposed by cmakev2 (v6.1)

See merge request espressif/esp-idf!48904
2026-07-03 17:47:24 +08:00
Mahavir Jain 0362f806e1 Merge branch 'feat/psa_its_custom_backend_v6.1' into 'release/v6.1'
Support custom storage backend for persistent PSA keys (v6.1)

See merge request espressif/esp-idf!49151
2026-07-03 11:34:23 +05:30
Mahavir Jain a298836ef1 Merge branch 'fix/fix_psk_hint_key_null_dereference_v6.1' into 'release/v6.1'
Fix/fix psk hint key null dereference (v6.1)

See merge request espressif/esp-idf!50321
2026-07-03 10:06:34 +05:30
Ashish Sharma 5d299793cf fix(esp-tls): guard against NULL PSK hint to prevent crash 2026-07-03 11:36:11 +08:00
morris fdb5e07768 Merge branch 'refactor/driver_dac_common_v6.1' into 'release/v6.1'
refactor(dac): improve the DAC driver (v6.1)

See merge request espressif/esp-idf!50237
2026-07-03 11:16:57 +08:00
Mahavir Jain 40974f42a3 Merge branch 'fix/aes_dma_psram_encrypted_mem_s31_v6.1' into 'release/v6.1'
fix(mbedtls/aes): Fix AES-DMA over encrypted PSRAM on ESP32-S31 (v6.1)

See merge request espressif/esp-idf!50252
2026-07-03 08:45:02 +05:30
morris 897347eb58 Merge branch 'fix/flash_32bit_addr_v6.1' into 'release/v6.1'
fix(spi_flash): fix flash 32bit address operation on esp32s31

See merge request espressif/esp-idf!50295
2026-07-03 11:08:45 +08:00
Chen Yu Dong 0b4ed5eff5 ci: fix pytest markers
Backport of !49647 to release/v6.1
- IDFCI-12304
2026-07-03 10:55:51 +08:00
Jiang Jiang Jian dc9fc38bfe Merge branch 'backport/master-to-release-6.1-20260701' into 'release/v6.1'
fix(ci): Tolerate w32time already running on Windows CI VMs

See merge request espressif/esp-idf!50264
2026-07-03 10:46:04 +08:00
Jiang Jiang Jian bc42eeed6c Merge branch 'test/vfs_fix_register_check_v6.1' into 'release/v6.1'
test(vfs): Test changes regarding VFS register incorrect check fix and fix VFS host test not being run at all (v6.1)

See merge request espressif/esp-idf!49945
2026-07-03 10:45:43 +08:00
Jiang Jiang Jian 07333f33b0 Merge branch 'bugfix/idfci-12308-fatfs-bdl-test-stack-overflow_v6.1' into 'release/v6.1'
fix(fatfs): avoid stack overflow in BDL diskio partition test (v6.1)

See merge request espressif/esp-idf!50247
2026-07-03 10:45:30 +08:00
Jiang Jiang Jian 271b2cda9b Merge branch 'bugfix/idfci-8839-remove-orphan-test-configs_v6.1' into 'release/v6.1'
fix(fatfs): re-enable fatfs and vfs psram/ccomp CI tests (v6.1)

See merge request espressif/esp-idf!50184
2026-07-03 10:45:17 +08:00
harshal.patil b5d53b87ef feat(mbedtls/psa_esp_rsa_ds): Expose persistent key buffer format/parse helpers 2026-07-02 16:00:23 +05:30
harshal.patil b3214f13c6 feat(examples/security): Add example to demonstrate the usage of custom key storages with PSA 2026-07-02 16:00:23 +05:30