[Security] Fix CRITICAL vulnerability: V-001#217
[Security] Fix CRITICAL vulnerability: V-001#217orbisai0security wants to merge 1 commit intoruvnet:mainfrom
Conversation
Automatically generated security fix
ruvnet
left a comment
There was a problem hiding this comment.
Code Review — PR #217
Recommendation: HOLD (already fixed on main)
Summary
This PR (from OrbisAI Security) fixes V-001: a buffer overflow in csi_collector.c where memcpy of iq_len bytes from untrusted CSI packets lacks bounds validation. The PR adds:
- Buffer size validation (header size check)
- CSI data length upper bound (
CSI_MAX_FRAME_SIZE - CSI_HEADER_SIZE) - Minimum CSI data length check (< 2 rejection)
- Subcarrier count validation (0-256 range)
- Explicit bounds check before the final
memcpy - Length validation in
wifi_csi_callbackbeforeedge_enqueue_csi
Security Assessment
- The vulnerability is real and the fix approach is correct. Defense-in-depth with multiple validation layers is good practice for firmware handling untrusted wireless input.
- No new vulnerabilities introduced. All checks are fail-safe (return 0 / reject packet).
Conflict Assessment (ADR-069 through ADR-078)
- This fix is already on main. Commit
8a84748a8and subsequent firmware work already addressed CSI buffer validation. Ourcsi_collector.con main includes bounds checking incsi_serialize_frameandwifi_csi_callback. - Merging would cause conflicts with the current
csi_collector.cwhich has diverged significantly (NVS node_id, ADR-069 Cognitum pipeline changes).
Recommendation
This PR targets a stale version of csi_collector.c. The vulnerability it addresses has been independently fixed on main through commits 6f23e8990 and a4bd2308b. Merging as-is would produce merge conflicts.
Verdict: HOLD — the security issue is valid but already addressed on main. Thank the contributor and close with explanation.
|
Thank you @orbisai0security for identifying V-001. This vulnerability has been fixed on main through commits 6f23e89 and 8a84748 (bounds checking in csi_collector.c). Closing as superseded — the fix is already in v0.5.5. Your security work is appreciated! |
Security Fix
This PR addresses a CRITICAL severity vulnerability detected by our security scanner.
Security Impact Assessment
Vulnerability Details
V-001firmware/esp32-csi-node/main/csi_collector.cChanges Made
This automated fix addresses the vulnerability by applying security best practices.
Files Modified
firmware/esp32-csi-node/main/csi_collector.cVerification
This fix has been automatically verified through:
🤖 This PR was automatically generated.