Check wasm->native pointer validity based on active pages
Previously the wasm->native invoke wrapper would validate wasm pointers based on their validity in the mapped memory pages. This only means the pointer lied within the 12GB virtual memory map. So it was trival to hand off a pointer from wasm->native that would segv when native code accessed it. This is caught (and handled) but preference is for there to be no way to segv inside of native code to prevent any oddities from longjmping. Now, check that the pointer lies within the "active" memory pages -- pages that are R/Wable
Showing
想要评论请 注册 或 登录