Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzz bug: missing bounds checks in element segment instantiation #6431

Open
tlively opened this issue Mar 23, 2024 · 1 comment
Open

Fuzz bug: missing bounds checks in element segment instantiation #6431

tlively opened this issue Mar 23, 2024 · 1 comment

Comments

@tlively
Copy link
Member

tlively commented Mar 23, 2024

V8 very reasonably fails to instantiate this module:

(module
 (table $0 1 funcref)
 (elem $0 (offset (i32.sub (i32.const 0) (i32.const 1))))
)

But our interpreter does not perform the proper bounds checks, so it happily allows instantiation to succeed. Instead of adding the bounds checks, we should have the initialization logic call out to the interpretation of table.init, which is what the spec does.

@kripken
Copy link
Member

kripken commented Mar 26, 2024

Looks like we don't have TableInit implemented yet, so that would be the first step here.

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

No branches or pull requests

2 participants