1.3 KiB
ESP-IDF 5-MOAD Scan — 2026-03-31
Target: https://github.com/espressif/esp-idf (depth=1)
MOAD-0001 (CWE-407) — CLEAN
WiFi core (esp_wifi) is a precompiled binary blob (no C source for station list). Bluetooth GATT utils (gatt_utils.c) iterates fixed-size arrays bounded by GATT_MAX_APPS (max ~10 simultaneous GATT apps) and GATT_MAX_BG_CONN_DEV — not O(N^2) at IoT scale; array sizes are compile-time constants, not user-controlled. NVS page scan iterates ENTRY_COUNT (126 entries per page) — bounded, not unbounded. No O(N^2) hot-path defect found.
MOAD-0002 (Intertangle) — CLEAN
Components are cleanly decoupled: esp_wifi, bt, nvs_flash, esp-tls, esp_http_client each have their own init/deinit. No shared mutable god object found coupling independent subsystems.
MOAD-0003 (Leaked Context) — CLEAN
ESP-IDF is C-based, uses FreeRTOS tasks. No thread-local storage API misuse found. pvTaskGetThreadLocalStoragePointer usage in components is scoped to task setup, not request-identity leakage.
MOAD-0004 (CWE-312) — 2 DEFECTS FOUND
See esp-idf-0001 and esp-idf-0002.
MOAD-0005 (Thundering Herd) — CLEAN
NVS uses NVSHandleLocked with Lock RAII guard on every read/write operation. WiFi event loop is single-threaded event dispatch. No concurrent cache stampede found.