Skip to content

bindings/rust: guard scalars length check against overflow - #293

Closed
arib06 wants to merge 1 commit into
supranational:masterfrom
arib06:rust-scalars-len-overflow
Closed

arib06 wants to merge 1 commit into
supranational:masterfrom
arib06:rust-scalars-len-overflow

Conversation

@arib06

@arib06 arib06 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

nbytes * npoints in MultiPoint::mult wraps on a bogus nbits and skips the scalars length check, so blst then reads past the scalars buffer; switch to checked_mul so an overflowing product is rejected through the existing panic instead.

@dot-asm dot-asm closed this in 079d590 Oct 14, 2026
@dot-asm

dot-asm commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

I've chosen different, arguably more intuitive approach. Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants