Vulnérabilités / CVE-2022-24791

critique

CVE-2022-24791

Use after free in Wasmtime

Publiée Modifiée CWE 416
Dans la Trivy database depuis au moins le 24 oct. 2026, 07:11 UTCLa date d'entrée avant ce build n'est pas enregistrée.

Sévérité par source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA8.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Le label propre à Trivy est CRITICAL. Critique selon NVD. Plus basse selon GHSA (élevée), Ubuntu (moyenne).

Description

Wasmtime is a standalone JIT-style runtime for WebAssembly, using Cranelift. There is a use after free vulnerability in Wasmtime when both running Wasm that uses externrefs and enabling epoch interruption in Wasmtime. If you are not explicitly enabling epoch interruption (it is disabled by default) then you are not affected. If you are explicitly disabling the Wasm reference types proposal (it is enabled by default) then you are also not affected. The use after free is caused by Cranelift failing to emit stack maps when there are safepoints inside cold blocks. Cold blocks occur when epoch interruption is enabled. Cold blocks are emitted at the end of compiled functions, and change the order blocks are emitted versus defined. This reordering accidentally caused Cranelift to skip emitting some stack maps because it expected to emit the stack maps in block definition order, rather than block emission order. When Wasmtime would eventually collect garbage, it would fail to find live references on the stack because of the missing stack maps, think that they were unreferenced garbage, and therefore reclaim them. Then after the collection ended, the Wasm code could use the reclaimed-too-early references, which is a use after free. Patches have been released in versions 0.34.2 and 0.35.2, which fix the vulnerability. All Wasmtime users are recommended to upgrade to these patched versions. If upgrading is not an option for you at this time, you can avoid the vulnerability by either: disabling the Wasm reference types proposal, config.wasm_reference_types(false); or by disabling epoch interruption if you were previously enabling it. config.epoch_interruption(false).

Paquets affectés et versions corrigées

SourcePaquetCorrigé en
cargo::GitHub Security Advisory Rustwasmtime0.34.2, 0.35.2
conan::GitLab Advisory Database Communitywasmtime0.34.2, 0.35.2
rapidfort ubuntu 20.04thunderbirdpas de correctif indiqué
rapidfort ubuntu 22.04thunderbirdpas de correctif indiqué
rapidfort ubuntu 24.04thunderbirdpas de correctif indiqué
ubuntu 22.04firefox1:1snap1-0ubuntu1
ubuntu 22.10firefox1:1snap1-0ubuntu1
ubuntu 23.04firefox1:1snap1-0ubuntu1
ubuntu 23.10firefox1:1snap1-0ubuntu1
ubuntu 24.04firefox1:1snap1-0ubuntu1

Références

Les 9 références

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.