Multiple integer overflows (Apple)

Warning

This resource is maintained for historical reference and does not contain the latest vulnerability info for Python.

The canonical database for vulnerabilities affecting Python is available on GitHub in the Open Source Vulnerability (OSV) format. This database can be viewed online at the Open Source Vulnerability Database.

Security patches from Apple: prevent integer overflows when allocating memory.

CVE-ID:

  • CVE-2008-1679 (imageop)
  • CVE-2008-1721 (zlib)
  • CVE-2008-1887 (PyString_FromStringAndSize())
  • CVE-2008-2315
  • CVE-2008-2316 (hashlib)
  • CVE-2008-3142 (unicode_resize(), PyMem_RESIZE())
  • CVE-2008-3144 (PyOS_vsnprintf())
  • CVE-2008-4864 (imageop)

Dates:

  • Disclosure date: 2008-07-31 (commit)
  • Reported by: Apple

Fixed In

CVE-2008-1679

Multiple integer overflows in imageop.c in Python before 2.5.3 allow context-dependent attackers to cause a denial of service (crash) and possibly execute arbitrary code via crafted images that trigger heap-based buffer overflows. NOTE: this issue is due to an incomplete fix for CVE-2007-4965.

CVE-2008-1721

Integer signedness error in the zlib extension module in Python 2.5.2 and earlier allows remote attackers to execute arbitrary code via a negative signed integer, which triggers insufficient memory allocation and a buffer overflow.

CVE-2008-1887

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.

CVE-2008-2315

Multiple integer overflows in Python 2.5.2 and earlier allow context-dependent attackers to have an unknown impact via vectors related to the (1) stringobject, (2) unicodeobject, (3) bufferobject, (4) longobject, (5) tupleobject, (6) stropmodule, (7) gcmodule, and (8) mmapmodule modules. NOTE: The expandtabs integer overflows in stringobject and unicodeobject in 2.5.2 are covered by CVE-2008-5031.

CVE-2008-2316

Integer overflow in _hashopenssl.c in the hashlib module in Python 2.5.2 and earlier might allow context-dependent attackers to defeat cryptographic digests, related to “partial hashlib hashing of data exceeding 4GB.”

CVE-2008-3142

Multiple buffer overflows in Python 2.5.2 and earlier on 32bit platforms allow context-dependent attackers to cause a denial of service (crash) or have unspecified other impact via a long string that leads to incorrect memory allocation during Unicode string processing, related to the unicode_resize function and the PyMem_RESIZE macro.

CVE-2008-3144

Multiple integer overflows in the PyOS_vsnprintf function in Python/mysnprintf.c in Python 2.5.2 and earlier allow context-dependent attackers to cause a denial of service (memory corruption) or have unspecified other impact via crafted input to string formatting operations. NOTE: the handling of certain integer values is also affected by related integer underflows and an off-by-one error.

CVE-2008-4864

Multiple integer overflows in imageop.c in the imageop module in Python 1.5.2 through 2.5.1 allow context-dependent attackers to break out of the Python VM and execute arbitrary code via large integer values in certain arguments to the crop function, leading to a buffer overflow, a different vulnerability than CVE-2007-4965 and CVE-2008-1679.

Timeline

Timeline using the disclosure date 2008-07-31 as reference:

  • 2008-04-10 (-112 days): CVE-2008-1721 published
  • 2008-04-18 (-104 days): CVE-2008-1887 published
  • 2008-04-22 (-100 days): CVE-2008-1679 published
  • 2008-07-31: Disclosure date (commit)
  • 2008-07-31: commit e7d8be8 (branch 2.6)
  • 2008-08-01 (+1 days): CVE-2008-2315 published
  • 2008-08-01 (+1 days): CVE-2008-2316 published
  • 2008-08-01 (+1 days): CVE-2008-3142 published
  • 2008-08-01 (+1 days): CVE-2008-3144 published
  • 2008-08-24 (+24 days): commit 3ce5d92 (branch 2.7)
  • 2008-10-01 (+62 days): Python 2.6.0 released
  • 2008-11-01 (+93 days): CVE-2008-4864 published
  • 2008-12-03: Python 3.0.0 released