A crazy thought
A crazy thought
Posted Jan 20, 2026 6:14 UTC (Tue) by Cyberax (✭ supporter ✭, #52523)In reply to: A crazy thought by aszs
Parent article: Task-level io_uring restrictions
Yes, it does. WASM, just like eBPF, by construction can't access memory outside of its sandbox.
And just like in eBPF, WASM doesn't actually even _have_ pointers. It instead has indices in memory blocks, and they are always range-checked. Go on and try to read the spec: https://webassembly.github.io/spec/core/syntax/modules.ht...
It is very common for old C/C++ programs to re-create the malloc/free on top of a large pre-allocated block of memory in WASM and to use indexes to emulate the C/C++ pointers. And it's possible for C/C++ code in WASM to have out-of-bounds reads/writes, just like on the real hardware. So if you compile OpenSSL into WASM, it will still be vulnerable to a Heartbleed-like bug.
However, the out-of-bounds access in WASM still can NOT escape the memory blocks. They are compiled into index-based array operations, and they are always range-checked.
And of course, exactly the same scenario can happen in eBPF with arenas. The eBPF verifier won't do anything to help.
