Stream: git-wasmtime

Topic: wasmtime / issue #14048 The `Store::epoch_deadline_callba...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2026 at 15:31):

alexcrichton opened issue #14048:

Currently Store::epoch_deadline_callback provides the ability to run a custom embedder-defined hook whenever an epoch change is detected by guest code executing. This callback is yielded a StoreContextMut<T> which enables full access to pretty much everything in the store, including executing/mutating wasm. This is, as we've now realized, too poweful of a capability. Stemming from discussions on https://github.com/bytecodealliance/wasmtime/issues/11869 it is a semantic specification violation for any guest-visible state in the store to get mutated between wasm instructions. This means that if the embedder were to call into wasm, mutate a global, mutate memory, mutate tables, etc, this is all in violation of wasm semantics. This mutation has additionally been a contributing factor in security vulnerabilities in the past.

The current thinking is that we may want to replace the StoreContextMut argument with a custom type that gives access to &mut T and gives access to StoreContext (implements AsContext). This would continue to allow the embedder to inspect/mutate their own state, but would disallow embedders from mutating anything within the store.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 13 2026 at 16:29):

fitzgen added the wasmtime:api label to Issue #14048.


Last updated: Aug 30 2026 at 09:07 UTC