Skip to main content
Menu
Advisories

Overlapping string transcode in a fused adapter can panic

GHSA-54P9-VHHQ-8F7QPublished Updated GitHub

Description

Wasmtime contained a bug where components containing fused adapters, or components calling components, could trigger a panic on the host in some situations where a string is transferred from one location to another. Wasmtime historically raised a trap in this situation and recent refactorings meant that this trap was no longer raised.

Impact

The impact of this bug is that a WebAssembly guest can trigger a panic!() in the host through normal default execution. This is considered a denial-of-service vector in Wasmtime. The precise scenario that a trap is raised is when a same-instance component-to-component call is made which transfers a string where the source and destination alias each other. Wasmtime prior to 49.0.0 raised a trap in this situation and refactorings in 49.0.0 meant that this no longer trapped but accidentally got the point of raising a panic. The precise behavior of this operation is something still being clarified in the upstream specification, and for now Wasmtime will continue to trap as it has historically done.

Patches

Wasmtime 49.0.3 has been released fixing this issue and restoring the historical trap.

Affected versions

References

GitHub · bytecodealliance/wasmtime