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

Improve lexing of invalid annotations (fixes fuzz failure) #2150

Merged
merged 1 commit into from
Feb 25, 2023

Conversation

keithw
Copy link
Member

@keithw keithw commented Feb 25, 2023

wat2wasm had been crashing on some invalid annotations, even with annotations disabled (as found by oss-fuzz in issue 53935).

I missed this in #2001 when updating the parser to match the updated spec (WebAssembly/spec#1499). This PR fixes the lexer and adds a regression test.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53935

N.B. With annotations enabled, wat2wasm seems to go into an infinite loop on this same input; will require further investigation.

@keithw keithw requested a review from sbc100 February 25, 2023 11:54
This had been crashing even with annotations disabled.
Adds a regression test.

This was missed in #2001 when updating the parser to match
the updated spec (WebAssembly/spec#1499).

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53935
@keithw keithw force-pushed the improve-annotation-parse branch from 478b0a9 to 828277f Compare February 25, 2023 20:20
@keithw keithw enabled auto-merge (squash) February 25, 2023 20:21
@keithw keithw merged commit 3d9ec15 into main Feb 25, 2023
@keithw keithw deleted the improve-annotation-parse branch February 25, 2023 20:41
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