Hacker News new | ask | show | jobs
by justincormack 5258 days ago
You can still sandbox it and not provide direct access to ffi to user code, only some tested ffi calls. Just like native in that way.
1 comments

If FFI is loadable, how are you going to prevent your untrusted script from loading it and going to town? How are you going to avoid providing "direct access?" My whole point is that I don't think you can. It's all or nothing. If ffi is available to some Lua code, it is available to all of it.

I even asked Mike Paul (LuaJIT author this question, and he said "That's not a viable approach for sandboxing.") http://lua-users.org/lists/lua-l/2011-02/msg01582.html