Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS03NWpwLXZxOHgtaDRjcc4AA501

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

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:

Special thanks

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

Permalink: https://github.com/advisories/GHSA-75jp-vq8x-h4cq
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03NWpwLXZxOHgtaDRjcc4AA501
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: 9 months ago
Updated: 9 months ago


Identifiers: GHSA-75jp-vq8x-h4cq, CVE-2024-28123
References: Repository: https://github.com/wasmi-labs/wasmi
Blast Radius: 0.0

Affected Packages

cargo:wasmi
Dependent packages: 55
Dependent repositories: 2,634
Downloads: 7,634,291 total
Affected Version Ranges: >= 0.15.0, <= 0.31.0
Fixed in: 0.31.1
All affected versions: 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.18.1, 0.19.0, 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.26.0, 0.26.1, 0.27.0, 0.28.0, 0.29.0, 0.30.0, 0.31.0
All unaffected versions: 0.0.0, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.1, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.7.0, 0.8.0, 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.13.2, 0.14.0, 0.31.1, 0.31.2, 0.32.0, 0.32.1, 0.32.2, 0.32.3, 0.33.0, 0.33.1, 0.34.0, 0.35.0, 0.36.0, 0.36.1, 0.36.2, 0.36.3, 0.36.4, 0.36.5, 0.37.0, 0.37.1, 0.37.2, 0.38.0, 0.39.0, 0.39.1