Repository navigation
P0 MMS Reporting: fail closed on zero-payload BIT STRING underflow - #213
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Confirmed root cause
src/mms/reporting.cpp:decode_bit_fieldon current main computed(raw.size()-1)*8 - unusedwithsize_t. Header-only MMS BIT STRING with 1..7 unused bits has zero payload and underflows to a huge iteration bound, indexing beyond the received frame buffer. This is a network-originated malformed-input safety issue.Fix
MmsReportingFormatError.Scope and provenance
Two core files only; no alternate decoder, GUI workaround, thread, packet format or breaking API. Rediscovered while auditing old unmerged draft #133; deliberately applied the focused patch to today's
mainrather than force-merging the stale draft.Gates
Require exact-head C++ core/reporting + sanitizers (if triggered), CI and clean review before merge. Physical vendor interoperability remains separately unverified.