4 ms·
> In those same versions of Lua, the bytecode format is notoriously dangerous to load. Could you expand on this? Are the dangers such that they could be avoide
by tom_mellior 7y ago
> In those same versions of Lua, the bytecode format is notoriously dangerous to load.
Could you expand on this? Are the dangers such that they could be avoided with a bytecode verifier somewhat like Java's? Things like checking that the stack can never underflow, and that at the merge points of branches the stack always has the same depth.
- lpghatguy 7y agoHere are two slide decks talking (roughly) about real-world attacks against Lua 5.1 and 5.2's bytecode: 5.1: https://www.lua.org/wshop11/Cawley.pdf https://www.lua.org/wshop11/Cawley.pdf 5.2: https://apocrypha.numin.it/talks/lua_bytecode_exploitation.pdf https://apocrypha.numin.it/talks/lua_bytecode_exploitation.p... Lua used to have a built-in bytecode verifier as I understand it, but it never reached the point to where it was enough to safeguard the VM.