]> granicus.if.org Git - python/commit
SF patch 590294: os._execvpe security fix (Zack Weinberg).
authorGuido van Rossum <guido@python.org>
Mon, 5 Aug 2002 16:13:24 +0000 (16:13 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 5 Aug 2002 16:13:24 +0000 (16:13 +0000)
commitaed51d8121f321e37274171b695cd0e3876465c6
tree83e17c55398e4add85a2ed179e3c36ddf77cd776
parentaaebdd6a02dd4d650b14e2192e327336ecb62a98
SF patch 590294: os._execvpe security fix (Zack Weinberg).

1) Do not attempt to exec a file which does not exist
just to find out what error the operating system
returns. This is an exploitable race on all platforms
that support symbolic links.

2) Immediately re-raise the exception if we get an
error other than errno.ENOENT or errno.ENOTDIR. This
may need to be adapted for other platforms.

(As a security issue, this should be considered for 2.1
and 2.2 as well as 2.3.)
Lib/os.py