lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 8/22/2010 7:37 PM, HyperHacker wrote:
On Sun, Aug 22, 2010 at 05:17, KHMan wrote:
On 8/22/2010 7:05 PM, Martin Guy wrote:
[snip snip snip]
With Lua being embedded in every conceivable program, browser, photo
editor and web game, a security hole like this would be about as much
fun as the eternal security holes in flash player. A wise response
from the Lua dev community would be to reinstate the bytecode sanity
checking by default, and if removing it has significant advantages
(code size, speed) allowing it to be disabled only #ifdef
FAST_AND_FURIOUS

"reinstate the bytecode sanity checking by default"?

No you got it all wrong, the point is, there is currently no bulletproof
bytecode checker, hence the old one has been withdrawn. It is vulnerable, as
amply demonstrated. Peter has been at the forefront of this issue. A really
good bytecode verifier will need some very, very serious work.

It is easy to hope for simple solutions to loading outside code, but like
all security problems, there are a lot of wide-ranging issues to look into.

In any case where security is critical, shouldn't scripts not be
allowed to load (or generate) bytecode at all? IIRC load had a
parameter added to prevent it for exactly this reason. That's a much
saner solution than trying to prevent arbitrary code from being
malicious.

Precisely, you whatever necessary in a sandbox, various details are available on the Lua wiki. Those unsure should read Peter's posting again. He has demonstrated many ways of breaking the bytecode verifier in the past.

Performance is not really a big issue if one thinks practically. A very middling PC can load minimal-whitespace Lua source text from memory at a rate of at least 4MB/sec.

So no loading untrusted bytecode if there is a need for trust...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia