Python 3.5 Bytearray Pop And Remove Buffer Over-Read

Python versions 2.7 and 3.2 through 3.5 bytearray pop and remove methods suffer from buffer over-reads caused by memmove use under the assumption that PyByteArrayObject ob_size is less than ob_alloc, leading to a single byte over-read. This condition can be triggered by creating a bytearray from a range of length 0x10, then calling pop with a valid index.

Python 2.7 strop.replace() Integer Overflow

Python version 2.7 strop.replace() method suffers from an integer overflow that can be exploited to write outside the bounds of the string buffer and potentially achieve code execution. The issue can be triggered by performing a large substitution that overflows the arithmetic used in mymemreplace() to calculate the size of the new string.

You have new fax, document 00529586

You have a new fax!

Please download attached fax document.

Filesize:           112 Kb
Pages number:       11
Scan date:          Mon, 2 Nov 2015 15:12:08 +0300
Quality:            300 DPI
Scanned by:         Morris Chambers
Scan time:          52 seconds
Fax name:           fax-00529586.doc

Thanks for choosing Interfax!