Fix[mqbs]: bound QLIST queue record parsing and drop malformed events - #1748
Open
kaikulimu wants to merge 8 commits into
Open
Fix[mqbs]: bound QLIST queue record parsing and drop malformed events#1748kaikulimu wants to merge 8 commits into
kaikulimu wants to merge 8 commits into
Conversation
kaikulimu
force-pushed
the
fix-qlist-record-bounds
branch
3 times, most recently
from
September 2, 2026 18:29
6bebd0b to
e86182d
Compare
Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
…Event Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
kaikulimu
force-pushed
the
fix-qlist-record-bounds
branch
from
September 2, 2026 18:30
e86182d to
37b0ad4
Compare
kaikulimu
marked this pull request as ready for review
September 2, 2026 19:08
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.
Summary
FileStoreProtocolUtil::loadAppInfosreturnedvoidand never consulted the size of the application-ID area it was handed, so a declared appId count larger than the entries present read past the end. It now reports a status and bounds every field against the block.The section lengths declared by a
QueueRecordHeaderwere used without a consistency check, letting the application-ID area size underflow when computed by subtraction.loadQueueRecordLayoutnow derives and validates them together.FileStoreUtil::writeQueueCreationRecordImplguarded QLIST and journal capacity withBSLS_ASSERT_SAFE, and parsed the record only after copying it into the QLIST file. Capacity is now checked at runtime, and the file positions advance only once the record is validated.A malformed record was indistinguishable from a failed write in
FileStore::processStorageEventand reachedExitUtil::terminate(e_STORAGE_OUT_OF_SYNC). Such a record says nothing about whether self and the primary have diverged, so it now drops the event with an alarm; a genuine write failure still terminates.