Średnia

Wrong type for `Linker`-define functions when used across two `Engine`s

  • Ujawniono: 17.09.2021
  • Aktualizacja: 11.10.2026 13:19

Impact

As a Rust library the wasmtime crate clearly marks which functions are safe and which are unsafe, guaranteeing that if consumers never use unsafe then it should not be possible to have memory unsafety issues in their embeddings of Wasmtime. An issue was discovered in the safe API of Linker::func_* APIs. These APIs were previously not sound when one Engine was used to create the Linker and then a different Engine was used to create a Store and then the Linker was used to instantiate a module into that Store. Cross-Engine usage of functions is not supported in Wasmtime and this can result in type confusion of function pointers, resulting in being able to safely call a function with the wrong type.

Triggering this bug requires using at least two Engine values in an embedding and then additionally using two different values with a Linker (one at the creation time of the Linker and another when instantiating a module with the Linker).

It's expected that usage of more-than-one Engine in an embedding is relatively rare since an Engine is intended to be a globally shared resource, so the expectation is that the impact of this issue is relatively small.

The fix implemented is to change this behavior to panic!() in Rust instead of silently allowing it. Using different Engine instances with a Linker is a programmer bug that wasmtime catches at runtime.

Patches

This bug has been patched and users should upgrade to Wasmtime version 0.30.0.

Workarounds

If you cannot upgrade Wasmtime and are using more than one Engine in your embedding it's recommended to instead use only one Engine for the entire program if possible. An Engine is designed to be a globally shared resource that is suitable to have only one for the lifetime of an entire process. If using multiple Engines is required then code should be audited to ensure that Linker is only used with one Engine.

For more information

If you have any questions or comments about this advisory:

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Python (PyPI) wasmtime < 0.30.0 0.30.0

Odnośniki

Ocena CVSS 6.3/10
Wektor CVSS
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H
Słabość (CWE)
CWE-125, CWE-590, CWE-787, CWE-416, CWE-843
Platforma
Python (PyPI)
Paczka
wasmtime
Ujawniono
17.09.2021
Aktualizacja
11.10.2026 13:19

Źródła i licencje

OSV / GitHub Advisory Database - PYSEC-2021-320 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2021-321 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2021-322 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-4873-36h9-wv49 - CC BY 4.0

OSV / GitHub Advisory Database - GHSA-v4cp-h94r-m7xf - CC BY 4.0

OSV / GitHub Advisory Database - GHSA-q879-9g95-56mx - CC BY 4.0

Historia podatności: wasmtime

Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkich wpisów
5
Pierwsza → ostatnia
05.2021 04.2026
Bez poprawki
3
Wykorzystywana w atakach
0

Rozkład istotności

  • Wysoka 1
  • Średnia 3
  • Niska 1

Ujawnienia w latach

  1. 2021: 2
  2. 2022: 0
  3. 2023: 0
  4. 2024: 2
  5. 2025: 0
  6. 2026: 1
  1. Niska · 2.9 CVE-2024-47813 <= 19.0.0, <= 19.0.1, <= 19.0.2, <= 20.0.0, <= 20.0.1, <= 20.0.2, <= 21.0.0, <= 21.0.1, <= 22.0.0, <= 23.0.0, <= 23.0.1, <= 23.0.2, <= 24.0.0, <= 25.0.0, <= 25.0.1 brak poprawki
  2. Wrong type for `Linker`-define functions when used across two `Engine`s ten wpis
    Średnia · 6.3 CVE-2021-39216 < 0.30.0 0.30.0
  3. Wysoka · 7.2 CVE-2021-32629 < 0.27.0 0.27.0

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.