aethersdr / aethersdr/AetherSDR
Adjudicate the Antares Detector CWE-190 report against SpeProtocol's display-frame parsing
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 221
- Forks
- 117
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 302
Description
An automated scan ("Antares Detector") posted on #5541 (2026-09-10) naming src/core/SpeProtocol.cpp / src/gui/SpeLcdWidget.h as candidate CWE-190 — "unvalidated buffer growth in the display-frame length handling". Filing this so the report gets an explicit ruling instead of living only as a comment on a closing issue (raised by @NF0T in the #5542 review round).
My own analysis as the code's author, for the record — I believe the report is mistaken, but it deserves adjudication by someone who didn't write the code:
readDisplayCandidateaccumulates into aQByteArraybounded byLcd::kFrameLength(371) logical bytes — at most 742 raw bytes consumed in the telnet-escaped reading — andreserve()s that fixed amount up front. No length field read from the wire ever sizes an allocation: the6A 01bytes are validated against the expected constant, not used as a size.- The CNT frame path caps at
kMaxDataLengthbefore any allocation. FrameParser::m_bufgrowth is bounded per feed cycle: every loop iteration either consumes a complete frame, resyncs forward, clears the buffer when no sync byte remains, or returns waiting for a bounded remainder (≤742 bytes for a display candidate, ≤kMaxDataLength+6 for a CNT frame).SpeLcdWidget.hholds fixed-sizechars[8][40]/inverse[8][40]arrays filled byLcd::decode, which rejects any buffer that is not exactly the pinned frame length before touching them.
If adjudication confirms this reading, this closes with no code change; if it finds a path I missed, it becomes the repro for a fix. Protocol-fuzzing FrameParser::feed with random chunk splits would settle it empirically and might be worth having regardless.
73 de Miguel, EC5W
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/core/SpeProtocol.cpp, especially readDisplayCandidate and FrameParser::feed, then inspect the fixed-size arrays and decode validation in src/gui/SpeLcdWidget.h. Compare every allocation and buffer-growth path with the stated bounds; protocol-fuzzing FrameParser::feed with random chunk splits may help. Done means issuing an explicit ruling, with a repro and fix only if an unbounded path is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100