Skip to main content
Menu
Advisories

Stack overflow dropping a long chain of recursive types

GHSA-WJC8-633Q-PWXRPublished Updated GitHub

Description

Impact

Guests can trigger a crash in the host by defining a long chain of types which causes the host to stack overflow when removing the top level type from the type registry. This was caused because dropping one type can remove all references to an inner type and trigger a recursive call to drop that inner type which generates a stack who's depth is controlled by the length of the type chain. The dropping logic was originally protected against this guest-controlled recursion by converting it into an iterative loop, but recursion was accidentally introduced in Wasmtime 42.0.0. So all versions >= 42.0.0 are affected.

Patches

The fix is present in main and patch releases are made for 48.0.6 and 49.0.3.

Workarounds

There are no known workarounds.

Affected versions

References

GitHub · bytecodealliance/wasmtime