Description
Python 2.5.2 and earlier allows context-dependent attackers to execute arbitrary code via multiple vectors that cause a negative size value to be provided to the PyString_FromStringAndSize function, which allocates less memory than expected when assert() is disabled and triggers a buffer overflow.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 4.0 | python2.4 | 2.4.4-3+etch1 | DSA-1551-1 |
| Debian 4.0 | python2.5 | 2.5-5+etch1 | DSA-1620-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 5 | python +3 | 2.4.3-24.el5_3.6 | RHSA-2009:1176 |
| RHEL 4 | python +4 | 2.3.4-14.7.el4_8.2 | RHSA-2009:1177 |
| RHEL 3 | python +3 | 2.2.3-6.11 | RHSA-2009:1178 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | python-py | No fix yet | — |
Advisories 5
- RHSA-2009:1176 Red Hat Security Advisory: python security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2009:1178 Red Hat Security Advisory: python security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2009:1177 Red Hat Security Advisory: python security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-1551-1 python2.4 - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-1620-1 python2.5 - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- SUSE-SR:2008:017 vendor-advisory
- http://bugs.python.org/issue2587
- GLSA-200807-01 vendor-advisory
- 30872 third-party-advisory
- 20090824 rPSA-2009-0122-1 idle python mailing-list
- 33937 third-party-advisory
- oval:org.mitre.oval:def:8624 vdb-entry signature
- 37471 third-party-advisory
- python-pystringfromstringandsize-bo(41944) vdb-entry
- 31687 third-party-advisory
- oval:org.mitre.oval:def:10407 vdb-entry signature
- 20080411 IOActive Security Advisory: Incorrect input validation in PyString_FromStringAndSize() leads to multiple buffer overflows mailing-list
- DSA-1551 vendor-advisory
- http://www.vmware.com/security/advisories/VMSA-2009-0016.html
- http://support.apple.com/kb/HT3438
- APPLE-SA-2009-02-12 vendor-advisory
- http://wiki.rpath.com/wiki/Advisories:rPSA-2009-0122
- 28749 vdb-entry
- USN-632-1 vendor-advisory
- 20091120 VMSA-2009-0016 VMware vCenter and ESX update release and vMA patch release address multiple security issue in third party components mailing-list
- 31518 third-party-advisory
- 31365 third-party-advisory
- 31255 third-party-advisory
- http://www.novell.com/support/search.do?cmd=displayKC&docType=kc&externalId=InfoDocument-patchbuilder-readme5032900
- DSA-1620 vendor-advisory
- ADV-2009-3316 vdb-entry
- 29889 third-party-advisory