5 ms·
Security researchers on the other hand run away screaming when you tell them that all of your data and configuration files are a complete language and you execu
by jandrese 6y ago
Security researchers on the other hand run away screaming when you tell them that all of your data and configuration files are a complete language and you execute the language to parse the files.
- awirth 6y agoDepends on the type of security researcher -- some profit from it!
- saagarjha 6y agoThe problem is usually not Turing completeness but complexity, which invites bugs in the parser implementation. (The former is trivial to solve: add a timeout.)
- adwn 6y ago> The problem is usually not Turing completeness [...] You're technically correct (the best kind of correct), but jandrese wrote "a complete language", not "a Turing-complete language". You don't need Turing-completeness to create security problems – filesystem access alone does that. > The former is trivial to solve: add a timeout. That only solves the termination problem, which is a minor concern anyway. You don't need much time to compromise a system if you have filesystem access. No "bugs in the parser implementation" needed.
- imtringued 6y agoYou can start a lua VM with an empty environment (basically no standard library).
- adwn 6y agoThe first thing any scripting-language-used-as-flexible-config-files will want to add is a way to include shared config files, typically with computed (i.e., non-constant) file names or paths. It's possible to sandbox this, but also rather complex compared to a non-executable data file format.
- Dylan16807 6y agoYou're going to want the ability to pull in shared config files whether you're using a scripting language or not. And the way you need to sandbox those paths is roughly the same either way.
- silon42 6y agoWhy would only security researchers care about this? To everyone writing a service that accepts un-trusted (network, user) data this should be a very bad idea.
- chii 6y agobecause anyone writing code that needs to accept untrusted data is defacto acting as a security "researcher"!
- soapdog 6y agoIn the case of Lua, you can load that data and configuration Lua files in a protected environment with access only to the functions you provide. This is a built-in feature and pattern that many people who are integrating Lua in their app follow.