killing thread ?
Jp Calderone
exarkun at intarweb.us
Fri Jan 24 12:44:24 EST 2003
On Fri, Jan 24, 2003 at 07:52:08AM -0800, Paul Rubin wrote:
> Peter Hansen <peter at engcorp.com> writes:
> > If you're worried about some kind of denial of service type
> > thing with code written by someone else: you're out of luck.
> > Don't use Python. (Or, better yet, get over the worry and just
> > accept this possibility.)
>
> Wha? Python provides the rexec and bastion modules specifically to
> have a way to run hostile code in a sandbox. So what kind of advice
> is "don't use Python"? If sandboxed code can be prevented from
> accessing sensitive data or doing i/o, but can't be prevented from
> looping unkillably, that's a bug in Python.
Yes, that's why Python provides them. But this misconception (that they
work) is also why it will soon -not- provide them :P And neither RExec nor
Bastion ever protected you against "while 1: pass" or "100L ** 100L ** 100L
** 100L ** 100L". It is currently not possible to write a secure sandbox in
Python. I'm not sure if you can call that a bug; it's certainly
unfortunate.
Jp
--
A sad spectacle. If they be inhabited, what a scope for misery
and folly. If they be not inhabited, what a waste of space.
-- Thomas Carlyle, looking at the stars
--
up 39 days, 21:49, 1 user, load average: 0.81, 0.64, 0.57
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030124/2afad97f/attachment.sig>
More information about the Python-list
mailing list