WebAssembly / WebAssembly/wabt

Bug report on wabt( AddressSanitizer: OOM)

Open
#1,794 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

sanitizer failures
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

  1. Download the attached file
  2. Execute make_wabt_bug2.sh
  3. wabt/build/wabt-unittests --gtest_filter=WastParser.LongTokenSpace

Platform (please complete the following information):
OS: Ubuntu 18.04
wabt_bug2.tar.gz

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.