SECBUG-240 Fix out-of-bounds reads#325
Merged
jamis merged 5 commits intomongodb:masterfrom Mar 28, 2024
Merged
Conversation
comandeo-mongo
approved these changes
Mar 26, 2024
jamis
added a commit
to jamis/bson-ruby
that referenced
this pull request
Mar 28, 2024
* final tweaks for BSON 5 release * SECBUG-240 strlen might read beyond end of buffer * ruby 2.6 isn't supported * nix 2.6
jamis
added a commit
that referenced
this pull request
Apr 2, 2024
* SECBUG-240 Fix out-of-bounds reads (#325) * final tweaks for BSON 5 release * SECBUG-240 strlen might read beyond end of buffer * ruby 2.6 isn't supported * nix 2.6 * version bump
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.
Using
strlenmay result in reading beyond the end of the buffer (if the buffer is not null-terminated). For this reason, we should avoid usingstrlenand prefer a more explicit approach that also takes into account the size of the buffer.