"value":"Wasmtime is an open source runtime for WebAssembly. Under certain concurrent event orderings, a `wasmtime::Engine`'s internal type registry was susceptible to double-unregistration bugs due to a race condition, leading to panics and potentially type registry corruption. That registry corruption could, following an additional and particular sequence of concurrent events, lead to violations of WebAssembly's control-flow integrity (CFI) and type safety. Users that do not use `wasmtime::Engine` across multiple threads are not affected. Users that only create new modules across threads over time are additionally not affected. Reproducing this bug requires creating and dropping multiple type instances (such as `wasmtime::FuncType` or `wasmtime::ArrayType`) concurrently on multiple threads, where all types are associated with the same `wasmtime::Engine`. **Wasm guests cannot trigger this bug.** See the \"References\" section below for a list of Wasmtime types-related APIs that are affected. Wasmtime maintains an internal registry of types within a `wasmtime::Engine` and an engine is shareable across threads. Types can be created and referenced through creation of a `wasmtime::Module`, creation of `wasmtime::FuncType`, or a number of other APIs where the host creates a function (see \"References\" below). Each of these cases interacts with an engine to deduplicate type information and manage type indices that are used to implement type checks in WebAssembly's `call_indirect` function, for example. This bug is a race condition in this management where the internal type registry could be corrupted to trigger an assert or contain invalid state. Wasmtime's internal representation of a type has individual types (e.g. one-per-host-function) maintain a registration count of how many time it's been used. Types additionally have state within an engine behind a read-write lock such as lookup/deduplication information. The race here is a time-of-check versus time-of-use (TOCTOU) bug where one thread atomically decrements a type entry's registration count, observes zero registrations, and then acquires a lock in order to unregister that entry. However, between when this first thread observed the zero-registration count and when it acquires that lock, another thread could perform the following sequence of events: re-register another copy of the type, which deduplicates to that same entry, resurrecting it and incrementing its registration count; then drop the type and decrement its registration count; observe that the registration count is now zero; acquire the type registry lock; and finally unregister the type. Now, when the original thread finally acquires the lock and unregisters the entry, it is the second time this entry has been unregistered. This bug was originally introduced in Wasmtime 19's development of the WebAssembly GC proposal. This bug affects users who are not using the GC proposal, however, and affects Wasmtime in its default configuration even when the GC proposal is disabled. Wasmtime users using 19.0.0 and after are all affected by this issue. We have released the following Wasmtime versions, all of which have a fix for this bug: * 21.0.2 * 22.0.1 * 23.0.3 * 24.0.1 * 25.0.2. If your application creates and drops Wasmtime types on multiple threads concurrently, there are no known workarounds. Users are encouraged to upgrade to a patched release."
"value":"Wasmtime es un entorno de ejecuci\u00f3n de c\u00f3digo abierto para WebAssembly. Bajo ciertas \u00f3rdenes de eventos concurrentes, el registro de tipos interno de `wasmtime::Engine` era susceptible a errores de doble anulaci\u00f3n de registro debido a una condici\u00f3n de ejecuci\u00f3n, lo que provocaba p\u00e1nicos y, potencialmente, corrupci\u00f3n del registro de tipos. Esa corrupci\u00f3n del registro podr\u00eda, despu\u00e9s de una secuencia adicional y particular de eventos concurrentes, provocar violaciones de la integridad del flujo de control (CFI) y la seguridad de tipos de WebAssembly. Los usuarios que no usan `wasmtime::Engine` en varios subprocesos no se ven afectados. Los usuarios que solo crean nuevos m\u00f3dulos en varios subprocesos a lo largo del tiempo tampoco se ven afectados. Para reproducir este error es necesario crear y eliminar varias instancias de tipo (como `wasmtime::FuncType` o `wasmtime::ArrayType`) simult\u00e1neamente en varios subprocesos, donde todos los tipos est\u00e1n asociados con el mismo `wasmtime::Engine`. **Los invitados de Wasm no pueden activar este error.** Consulte la secci\u00f3n \"Referencias\" a continuaci\u00f3n para obtener una lista de las API relacionadas con los tipos de Wasmtime que se ven afectadas. Wasmtime mantiene un registro interno de tipos dentro de un `wasmtime::Engine` y un motor se puede compartir entre subprocesos. Los tipos se pueden crear y referenciar mediante la creaci\u00f3n de un `wasmtime::Module`, la creaci\u00f3n de `wasmtime::FuncType` o una serie de otras API donde el host crea una funci\u00f3n (consulte \"Referencias\"acontinuaci\u00f3n).Cadaunodeestoscasosinteract\u00faaconunmotorparadeduplicarlainformaci\u00f3ndetipoyadministrarlos\u00edndicesdetipoqueseutilizanparaimplementarlascomprobacionesdetipoenlafunci\u00f3n`call_indirect`deWebAssembly,porejemplo.Esteerroresunacondici\u00f3ndeejecuci\u00f3nenestagesti\u00f3ndondeelregistrodetipointernopodr\u00edaestarda\u00f1adoparaactivarunaaserci\u00f3nocontenerunestadonov\u00e1lido.Larepresentaci\u00f3ninternadeWasmtimedeuntipotienetiposindividuales(porejemplo,unoporfunci\u00f3ndehost)quemantienenunrecuentoderegistrodecu\u00e1ntasvecessehautilizado.Lostipostambi\u00e9ntienenunestadodentrodeunmotordetr\u00e1sdeunbloqueodelecturayescritura,comoinformaci\u00f3ndeb\u00fasquedaodeduplicaci\u00f3n.Laejecuci\u00f3naqu\u00edesunerrordetiempodeverificaci\u00f3nversustiempodeuso(TOCTOU)dondeunhilodisminuyeat\u00f3micamenteelrecuentoderegistrosdeunaentradadetipo,observaceroregistrosyluegoadquiereunbloqueoparaanularelregistrodeesaentrada.Sinembargo,entreelmomentoenqueesteprimerhiloobserv\u00f3elrecuentoderegistrosceroyelmomentoenqueadquiereesebloqueo,otrohilopodr\u00edarealizarlasiguientesecuenciadeeventos:volveraregistrarotracopiadeltipo,quededuplicaesamismaentrada,resucit\u00e1ndolaeincrementandosurecuentoderegistros;luego,descartareltipoydisminuirsurecuentoderegistros;observarqueelrecuentoderegistrosahoraescero;adquirirelbloqueoderegistrodetipo;yfinalmenteanularelregistrodeltipo.Ahora,cuandoelhilooriginalfinalmenteadquiereelbloqueoyanulaelregistrodelaentrada,eslasegundavezqueseanulaelregistrodeestaentrada.Esteerrorseintrodujooriginalmenteeneldesarrollodelapropuestaderecolecci\u00f3ndeelementosnoutilizadosdeWebAssemblyenWasmtime19.Sinembargo,esteerrorafectaalosusuariosquenoutilizanlapropuestaderecolecci\u00f3ndeelementosnoutilizadosyafectaaWasmtimeensuconfiguraci\u00f3npredeterminadainclusocuandolapropuestaderecolecci\u00f3ndeelementosnoutilizadosest\u00e1deshabilitada.LosusuariosdeWasmtimequeutilizanlaversi\u00f3n19.0.0yposterioressevenafectadosporesteproblema.HemospublicadolassiguientesversionesdeWasmtime,todaslascualesti