InstanceHandler::memory_grow performs unsynchronized write to shared memory #1632
Labels
bug
Something isn't working
📦 lib-vm
About wasmer-vm
priority-medium
Medium priority issue
🚧 work in progress
Milestone
wasmer/lib/vm/src/instance.rs
Line 436 in a2e744a
This happens through
set_memory
wasmer/lib/vm/src/instance.rs
Line 224 in a2e744a
Because
InstanceHandler
isSend
andClone
shares the same underlyingInstance
this can cause two threads to write to the same place at the same time in a non-atomic way. This is a data-race. BecauseVMMemoryDefenition
is bigger than a pointer this will cause a mangled value being stored in some cases even if LLVM doesn't take advantage of the UB.The text was updated successfully, but these errors were encountered: