VYPR
Unrated severityNVD Advisory· Published Oct 28, 2022· Updated May 8, 2025

CVE-2022-43282

CVE-2022-43282

Description

wasm-interp v1.0.29 was discovered to contain an out-of-bounds read via the component OnReturnCallIndirectExpr->GetReturnCallDropKeepCount.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

3

Patches

Vulnerability mechanics

Root cause

"Missing bounds check in GetReturnCallDropKeepCount when accessing a type vector leads to an out-of-bounds read."

Attack vector

An attacker supplies a crafted WebAssembly binary (`.wasm` file) that contains a malformed `return_call_indirect` instruction. When `wasm-interp` (built with `--enable-all`) parses this instruction, the `OnReturnCallIndirectExpr` handler invokes `GetReturnCallDropKeepCount`, which reads past the bounds of a type vector, causing a segmentation fault [ref_id=1]. No authentication or special privileges are required — the victim need only run the interpreter on the malicious file.

Affected code

The out-of-bounds read occurs in `wabt::interp::(anonymous namespace)::BinaryReaderInterp::GetReturnCallDropKeepCount` at `src/interp/binary-reader-interp.cc:445` [ref_id=1]. The crash is triggered when `OnReturnCallIndirectExpr` (line 1176) calls `GetReturnCallDropKeepCount`, which performs a `size()` call on a `std::vector

What the fix does

No patch is included in the bundle. The advisory [ref_id=1] does not provide a fix or remediation guidance; it only documents the crash and the proof-of-concept file. Based on the stack trace, the vulnerability stems from missing bounds checking in `GetReturnCallDropKeepCount` when accessing the type vector of a `FuncType` — a fix would need to validate that the index used to query the vector does not exceed its size before calling `size()` or accessing elements.

Preconditions

  • inputThe victim must run wasm-interp (version 1.0.29, commit 3054d61f703d609995798f872fc86b462617c294) with the --enable-all flag on a malicious .wasm file.
  • inputThe attacker must supply a crafted .wasm binary containing a malformed return_call_indirect instruction.

Reproduction

Download the proof-of-concept file `poc-interp-3.wasm` (provided as `poc-interp-3.wasm.zip` in the advisory [ref_id=1]). Run: `wasm-interp --enable-all ./poc-interp-3.wasm`. The interpreter will crash with an AddressSanitizer SEGV at `GetReturnCallDropKeepCount`.

Generated on May 26, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

1

News mentions

0

No linked articles in our index yet.