WebAssembly / WebAssembly/wabt
Bug report on wabt( AddressSanitizer: OOM)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.1k
- Forks
- 827
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 18
Description
Describe the bug
A bug was found within the wabt. Though it might not be an intended use of the relevant API, the bug can still produce critical issues within a program using wabt. It would be best if the affected logic is checked beforehand.
The bug was found with a fuzzer based on the function "WastParser.LongTokenSpace".
This may cause problems in the use of libraries
This is potentially the cause of Out of Memory
I think Validation Check is needed to ensure safe code.
How To Reproduce
- Download the attached file
- Execute make_wabt_bug2.sh
- wabt/build/wabt-unittests --gtest_filter=WastParser.LongTokenSpace
Platform (please complete the following information):
OS: Ubuntu 18.04
wabt_bug2.tar.gz
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by extracting the attached wabt_bug2.tar.gz and running make_wabt_bug2.sh, then reproduce the failure with wabt/build/wabt-unittests --gtest_filter=WastParser.LongTokenSpace. Trace the affected parser logic and determine where validation should prevent the excessive allocation. Done means the reproducer no longer causes an AddressSanitizer out-of-memory failure and the test still passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100