Advisory

GHSA-75jp-vq8x-h4cq

Also known as: CVE-2024-28123

Summary

Wasmi Out-of-bounds Write for host to Wasm calls with more than 128 Parameters

Details

Summary

In the WASMI Interpreter, an Out-of-bounds Buffer Write will arise arise if the host calls or resumes a Wasm function with more parameters than the default limit (128), as it will surpass the stack value. This doesn’t affect calls from Wasm to Wasm, only from host to Wasm.

Impact

After conducting an analysis of the dependent Polkadot systems of wasmi: Pallet Contracts, Parity Signer, and Smoldot, we have found that none on those systems have been affected by the issue as they are calling host to Wasm function with a small limited amount of parameters always.

Mitigations

If you are using wasmi betwen version 0.15.0 and 0.31.0, please update it to the 0.31.1 patch release that we just published.

Workarounds

Ensure no more than 128 parameters can be pass in a call from the host to a Wasm function.

References

Patch PR: <PR>

Special thanks

Special thanks to Stellar Development Foundation for reporting this security vulnerability.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2024-03-07 17:26 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

wasmi

crates.io · All systems

Affected

  • introduced 0.15.0, fixed 0.31.1 (semver)

Fixed versions

0.31.1

Fix

  • Fixed version 0.31.1
    cargo update -p wasmi --precise 0.31.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences