{ "id": "CVE-2022-31146", "sourceIdentifier": "security-advisories@github.com", "published": "2022-07-21T04:15:11.937", "lastModified": "2022-07-27T22:42:25.033", "vulnStatus": "Analyzed", "descriptions": [ { "lang": "en", "value": "Wasmtime is a standalone runtime for WebAssembly. There is a bug in the Wasmtime's code generator, Cranelift, where functions using reference types may be incorrectly missing metadata required for runtime garbage collection. This means that if a GC happens at runtime then the GC pass will mistakenly think these functions do not have live references to GC'd values, reclaiming them and deallocating them. The function will then subsequently continue to use the values assuming they had not been GC'd, leading later to a use-after-free. This bug was introduced in the migration to the `regalloc2` register allocator that occurred in the Wasmtime 0.37.0 release on 2022-05-20. This bug has been patched and users should upgrade to Wasmtime version 0.38.2. Mitigations for this issue can be achieved by disabling the reference types proposal by passing `false` to `wasmtime::Config::wasm_reference_types` or downgrading to Wasmtime 0.36.0 or prior." }, { "lang": "es", "value": "Se presenta un error en el generador de c\u00f3digo de Wasmtime, Cranelift, en el que las funciones que usan tipos de referencia pueden carecer incorrectamente de los metadatos necesarios para la recolecci\u00f3n de basura en tiempo de ejecuci\u00f3n. Esto significa que si es producida una GC en tiempo de ejecuci\u00f3n, el pase de GC pensar\u00e1 err\u00f3neamente que estas funciones no presentan referencias vivas a los valores de la GC, reclam\u00e1ndolos y reasign\u00e1ndolos. La funci\u00f3n continuar\u00e1 entonces usando los valores asumiendo que no han sido GC'd, conllevando m\u00e1s tarde a un uso de memoria previamente liberada. Este bug fue introducido en la migraci\u00f3n al asignador de registros \"regalloc2\" que ocurri\u00f3 en Wasmtime versi\u00f3n 0.37.0 del 20-05-2022. Este bug ha sido parcheado y los usuarios deber\u00edan actualizar a Wasmtime versi\u00f3n 0.38.2. La mitigaci\u00f3n de este problema puede lograrse al hacer una de las siguientes cosas: * Deshabilitar la propuesta de tipos de referencia pasando \"false\" a [\"wasmtime::Config::wasm_reference_types\"](https://docs.rs/wasmtime/0.38.0/wasmtime/struct.Config.html#method.wasm_reference_types). * Desactualizar a Wasmtime versi\u00f3n 0.36.0 o anterior" } ], "metrics": { "cvssMetricV31": [ { "source": "nvd@nist.gov", "type": "Primary", "cvssData": { "version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH", "baseScore": 8.8, "baseSeverity": "HIGH" }, "exploitabilityScore": 2.8, "impactScore": 5.9 }, { "source": "security-advisories@github.com", "type": "Secondary", "cvssData": { "version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:L", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "availabilityImpact": "LOW", "baseScore": 6.4, "baseSeverity": "MEDIUM" }, "exploitabilityScore": 1.6, "impactScore": 4.7 } ] }, "weaknesses": [ { "source": "security-advisories@github.com", "type": "Primary", "description": [ { "lang": "en", "value": "CWE-416" } ] } ], "configurations": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:a:bytecodealliance:cranelift-codegen:*:*:*:*:*:rust:*:*", "versionStartIncluding": "0.84.0", "versionEndExcluding": "0.85.2", "matchCriteriaId": "5320439C-4F61-46CA-9952-B61C1D5C8F3A" }, { "vulnerable": true, "criteria": "cpe:2.3:a:bytecodealliance:wasmtime:*:*:*:*:*:rust:*:*", "versionStartIncluding": "0.37.0", "versionEndExcluding": "0.38.2", "matchCriteriaId": "53584B86-F94A-4F0C-B741-D526671C2B23" } ] } ] } ], "references": [ { "url": "https://github.com/WebAssembly/reference-types", "source": "security-advisories@github.com", "tags": [ "Third Party Advisory" ] }, { "url": "https://github.com/bytecodealliance/wasmtime/", "source": "security-advisories@github.com", "tags": [ "Product", "Third Party Advisory" ] }, { "url": "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-5fhj-g3p3-pq9g", "source": "security-advisories@github.com", "tags": [ "Mitigation", "Third Party Advisory" ] } ] }