Bug 187900 - CVE-2006-1542 Python buffer overflow
Summary: CVE-2006-1542 Python buffer overflow
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: python   
(Show other bugs)
Version: 4.0
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
: ---
Assignee: Jeremy Katz
QA Contact: Brock Organ
URL:
Whiteboard: public=20050922,reported=20060330,sou...
Keywords: Security
Depends On:
Blocks: CVE-2006-1542
TreeView+ depends on / blocked
 
Reported: 2006-04-04 11:57 UTC by Josh Bressers
Modified: 2008-01-29 09:43 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-09 21:29:07 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Josh Bressers 2006-04-04 11:57:04 UTC
Python buffer overflow

A bug was found in the way python determines the realpath() of the
current script.  The realpath() function is broken by design and
should not be used.

http://www.gotfault.net/research/exploit/gexp-python.py
http://www.gotfault.net/research/advisory/gadv-python.txt

I can crash FC4 and RHEL4 with this exploit.  Need to look at the
source.  It should have a low impact as you have to run a python
program from within a direcotory which is part of an insanely long
path.  The other distributions are likely not crashing as the maximum
path length returned by realpath() can differ.

Further testing has shown that this issue ONLY affects a python
program which resides inside the very long path (realpath, so you
can't use symlinks to fake it, a hardlink will work though).  Simply
running a python program with your CWD very long does nothing.

We don't allow suid python scripts, which means the only real path of
exploitation would be to trick another user into doing something
silly.  consolehelper adds quite a lot of sanity to how we run python
programs as root.



This issue also affects RHEL3
This issue also affects RHEL2.1

Comment 1 Josh Bressers 2006-04-04 12:20:35 UTC
After finding this issue:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1298813&group_id=5470

Which points us at bug 169046,

I determined this issue does not affect RHEL2 and RHEL3.  They use home grown
realpath functionality.



Note You need to log in before you can comment on or make changes to this bug.