PT-2022-20562
CVE-2022-31146
·
Published
2022-07-12
·
Updated
2022-07-27
Description by
CVSS 3.1
6.4
MediumMetricsAV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:L
Name of the Vulnerable Software and Affected Versions
Wasmtime versions 0.37.0 through 0.38.1
Description
There is a bug in Wasmtime's code generator, Cranelift, where functions using reference types may be incorrectly missing metadata required for runtime garbage collection. This means that if a GC happens at runtime, the GC pass will mistakenly think these functions do not have live references to GC'd values, reclaiming them and deallocating them. The function will then subsequently continue to use the values assuming they had not been GC'd, leading later to a use-after-free. This bug was introduced in the migration to the
regalloc2 register allocator that occurred in the Wasmtime 0.37.0 release.Recommendations
To resolve the issue, upgrade to Wasmtime version 0.38.2.
As a temporary workaround, consider disabling the reference types proposal by passing
false to wasmtime::Config::wasm reference types.
Alternatively, downgrade to Wasmtime 0.36.0 or prior.Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Found an issue in the description? Have something to add? Feel free to write us 👾