Skip to content

Fix panic with out-of-bounds flags in Value#13015

Merged
pchickey merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-oob-flags
Apr 9, 2026
Merged

Fix panic with out-of-bounds flags in Value#13015
pchickey merged 1 commit intobytecodealliance:mainfrom
alexcrichton:fix-oob-flags

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

Note: this is a fix for GHSA-m758-wjhj-p3jq

This commit fixes a panic when a component model Value is lifted from a flags value which specifies out-of-bounds bits as 1. This is specified in the component model to ignore the out-of-bounds bits, which flags! correctly did (and thus bindgen!), but Value treated out-of-bounds bits as a panic due to indexing an array.

This commit fixes a panic when a component model `Value` is lifted from
a flags value which specifies out-of-bounds bits as 1. This is specified
in the component model to ignore the out-of-bounds bits, which `flags!`
correctly did (and thus `bindgen!`), but `Value` treated out-of-bounds
bits as a panic due to indexing an array.
@alexcrichton alexcrichton requested a review from a team as a code owner April 9, 2026 18:54
@alexcrichton alexcrichton requested review from pchickey and removed request for a team April 9, 2026 18:54
@pchickey pchickey added this pull request to the merge queue Apr 9, 2026
Merged via the queue into bytecodealliance:main with commit 7813436 Apr 9, 2026
48 checks passed
@alexcrichton alexcrichton deleted the fix-oob-flags branch April 9, 2026 20:50
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