Use-After-Free dans lucet-runtime (CVE-2021-43790)
Résumé
Vulnérabilité dans lucet-runtime (CVE-2021-43790). L'exploitation peut entraîner la prise de contrôle totale du système. Exploitable via Instance.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
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
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2021-43790 a été découverte dans lucet-runtime.
Des attaquants peuvent cibler un point d'entrée spécifique comme Instance à distance pour détourner le produit.
L'exploitation peut entraîner la prise de contrôle totale du système.
Action : appliquez le correctif officiel de l'éditeur.
En cas de doute, contactez votre service informatique ou cherchez « lucet-runtime CVE-2021-43790 » sur le site de l'éditeur.
CVE-2021-43790 (lucet-runtime) — CWE-416
Vecteur d'attaque : distant (réseau) / sans interaction utilisateur
Surface d'attaque : Instance / main / Instances / InstanceHandle
Contournement : There is no way to remediate this vulnerability without upgrading.
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une use-after-free (CWE-416) affecte lucet-runtime. Les attaquants atteignent le code vulnérable via Instance.
Consultez l'avis de l'éditeur pour les versions affectées de lucet-runtime. Surface d'attaque : Instance / main / Instances / InstanceHandle.
Gravité : ?. L'exploitation peut entraîner la prise de contrôle totale du système.
Mettre à jour vers la version corrigée selon l'avis éditeur.
Contournement : There is no way to remediate this vulnerability without upgrading.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'lucet-runtime' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
lucet-runtimeを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
There is no way to remediate this vulnerability without upgrading.パッチが適用されるまでの応急処置として、There is no way to remediate this vulnerability without upgrading. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory nvd.nist.gov
- advisory rustsec.org
- package crates.io
- package github.com
- web github.com
- web github.com