Add advisory for bitvec-nom2: BSlice::offset can trigger UB via unsound offset#2911
Open
DiuDiu777 wants to merge 1 commit into
Open
Add advisory for bitvec-nom2: BSlice::offset can trigger UB via unsound offset#2911DiuDiu777 wants to merge 1 commit into
BSlice::offset can trigger UB via unsound offset#2911DiuDiu777 wants to merge 1 commit into
Conversation
Member
|
@Geal ping? |
|
Looking into it tomorrow, thanks for the ping |
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.
Affected crate(s)
bitvec-nom2(1,011,172 recent downloads per crates.io; 10,569,329 total downloads)Links to upstream issue(s) or PR(s)
The issue was publicly reported upstream on 2026-03-09 and remains open with no maintainer response as of 2026-05-27.
Severity
Informational soundness issue. Safe Rust code can trigger undefined behavior by calling
BSlice::offseton twoBSlicevalues backed by different allocations.The affected implementation calls
offset_fromon the two underlying bit pointers. This is only valid when both pointers are derived from the same allocation. Miri reportsptr_offset_frombeing called on pointers from different allocations. Nounsafecode is required from the caller.Checklist
RUSTSEC-0000-0000as the IDdatefield is set to the public disclosure dateThe issue has been public for more than two months without upstream response. I am filing this advisory under RustSec's documented allowance for advisories after public disclosure with no upstream response.