Re: [Python-Dev] Python jail: whitelist vs blacklist

2009-02-24 Thread Guido van Rossum
On Tue, Feb 24, 2009 at 6:18 AM, tav wrote: > Ehm, I'd strongly discourage any approaches using proxies. The > performance penalties will just be insane. And yet your FileReader is essentially a proxy?! -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___

Re: [Python-Dev] Python jail: whitelist vs blacklist

2009-02-24 Thread Christian Heimes
Victor Stinner wrote: > This approach was implemented in PyPy using two interpreters. > > In CPython, we may use proxies on anything to check all operations. > jail -- validations --> real world > jail <-- proxy objects -- real world > > tav's jail might be converted to the whitelist appro

Re: [Python-Dev] Python jail: whitelist vs blacklist

2009-02-24 Thread tav
Hey Victor, > Today it's clear that tav's jail is broken. Forgive me as I'm sleep deprived, but no =) > Many hackers proved how to break it. > Fixing each hole is maybe not the good solution. The aim of this challenge has been to: 1. Validate the functions-based approach 2. Verify if the propo

Re: [Python-Dev] Python jail: whitelist vs blacklist

2009-02-24 Thread Nick Coghlan
Victor Stinner wrote: > My approach is maybe naive and imposible to implement :-) It actually goes back to some of the stuff Brett Cannon was working on in his object capabilities branch. However, one of the key building blocks turned out to be an easier to tailor import system, so the project was

[Python-Dev] Python jail: whitelist vs blacklist

2009-02-24 Thread Victor Stinner
Hi, Today it's clear that tav's jail is broken. Many hackers proved how to break it. Fixing each hole is maybe not the good solution. IMHO the problem is that tav choosed the blacklist approach: hide some "evil" attributes/functions and hope that the other are safe... which is wrong (eg. evil