-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load
/ loadfile
lua functions can load arbitrary bytecode
#116
Comments
Also Am I missing any more? |
I wonder if |
Okay, here is a list of everything that I think is potentially unsafe, some of it may simply have to be not loaded at all. Currently only
|
It might be simpler to set package.cpath to "" and disallow package.* entirely, as package.cpath should not be allowed to be set at all. Without setting package.cpath to empty string, |
AIUI this can be used to cause the interpreter to exhibit UB.
load
andloadfile
need to be wrapped so that themode
flag does not do anything, but unlike pcall / xpcall wrapping, this really seems to break the API of those functions.There has to be the ability to turn these wrappers off, just like there is the ability to force load the
debug
library, and similarly it will have to be behind an unsafe flag.The
load
andloadfile
wrappers shouldn't be too bad, and configuring them could be as simple as adding a flag toStdLib
that disables wrappingload
/loadfile
, though that breaks theStdLib
<=> 'library' equivalence.Probably this has to be a new 0.x version bump as well 😞
The text was updated successfully, but these errors were encountered: