Categories
CVE-2021-43790

Use-After-Free in lucet-runtime (CVE-2021-43790)

Summary

Vulnerability in lucet-runtime (CVE-2021-43790). Successful exploitation can lead to full system takeover. Exploitable via Instance.

Original description

The description as published by the source.

There is a bug in the main branch of Lucet's lucet-runtime
that allows a use-after-free in an Instance object that could
result in memory corruption, data race, or other related
issues. This bug was introduced early in the development
of Lucet and is present in all releases. As a result of
this bug, and dependent on the memory backing for the
Instance objects, it is possible to trigger a
use-after-free when the Instance is dropped.

Patches

Users should upgrade to the main branch of the Lucet
repository. Lucet does not provide versioned releases on
crates.io.

Workarounds

There is no way to remediate this vulnerability without
upgrading.

Description

Lucet uses a "pool" allocator for new WebAssembly
instances that are created. This pool allocator manages
everything from the linear memory of the wasm instance,
the runtime stack for async switching, as well as the
memory behind the Instance itself. Instances are referred
to via an InstanceHandle type which will, on drop,
release the memory backing the Instance back to the pool.

When an Instance is dropped, the fields of the Instance
are destructed top-to-bottom, however when the alloc:
Alloc field is destructed, the memory backing the
Instance is released back to the pool before the
destructors of the remaining fields are run. If another
thread allocates the same memory from the pool while
these destructors are still running, a race condition
occurs that can lead to use-after-free errors.

The bug was corrected by…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2021-43790 has been found in lucet-runtime.
Attackers can target a specific entry point like Instance over the network to misuse the product.
Successful exploitation can lead to full system takeover.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "lucet-runtime CVE-2021-43790" on the vendor's site.

CVE-2021-43790 (lucet-runtime) — CWE-416
Attack vector: remote (network-reachable) / no user interaction
Attack surface: Instance / main / Instances / InstanceHandle
Workaround: There is no way to remediate this vulnerability without upgrading.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Use-after-free (CWE-416) exists in lucet-runtime. Attackers reach the vulnerable code path via Instance.

📍 Affected scope

Check the vendor advisory for the affected versions of lucet-runtime. Attack surface: Instance / main / Instances / InstanceHandle.

🔥 Severity

Severity: ?. Successful exploitation can lead to full system takeover.

🔧 How to fix

Update to the patched release per vendor advisory.

🛡️ Workaround

Workaround: There is no way to remediate this vulnerability without upgrading.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'lucet-runtime' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'lucet-runtime' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で lucet-runtime を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaround mitigate
    There is no way to remediate this vulnerability without upgrading.

    パッチが適用されるまでの応急処置として、There is no way to remediate this vulnerability without upgrading. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

crates.io lucet-runtime
[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details