Advisory

UBUNTU-CVE-2022-24791

Also known as: CVE-2022-24791

Summary

The record has no summary.

Details

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).

Severity

Critical Basis: CVSS v3 score 9.8, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2022-03-31 23:15 UTC
Modified
2026-04-22 13:18 UTC

Affected packages and fixes

mozjs52

Debian packages (deb) · Ubuntu 18.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

mozjs38

Debian packages (deb) · Ubuntu 18.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

mozjs68

Debian packages (deb) · Ubuntu 20.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

mozjs52

Debian packages (deb) · Ubuntu 20.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

firefox

Debian packages (deb) · Ubuntu 22.04

Affected

  • introduced 0, fixed 1:1snap1-0ubuntu1 (ecosystem)

Fixed versions

1:1snap1-0ubuntu1

Fix

  • Fixed version 1:1snap1-0ubuntu1
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

mozjs78

Debian packages (deb) · Ubuntu 22.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

mozjs91

Debian packages (deb) · Ubuntu 22.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

thunderbird

Debian packages (deb) · Ubuntu 22.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

thunderbird

Debian packages (deb) · Ubuntu 24.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Ubuntu Security Notices · CC BY-SA 4.0

Sources & licences