New submission from Ferringb <ferri...@gmail.com>:

Roughly; tempfile's uniqueness is derived from a global random instance; while 
there are protections for thread access, a forked child process /will/ inherit 
that PRNG source, resulting in children/parent trying the same set of names.

Mostly it's proving annoying in some code I have to deal in, although it 
wouldn't surprise me if someone watching a known temp location could use the 
predictability in some fashion.

As for affect, all versions of python have this; attached patch is cut against 
trunk.

----------
files: unique-seed-per-process-tempfile.patch
keywords: patch
messages: 143192
nosy: ferringb
priority: normal
severity: normal
status: open
title: tempfile PRNG reuse between parent and child process
type: behavior
Added file: 
http://bugs.python.org/file23066/unique-seed-per-process-tempfile.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12856>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to