]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
python: fix _json module arbitrary process memory read vulnerability
authorDaniel BORNAZ <daniel.bornaz@enea.com>
Thu, 24 Jul 2014 13:51:44 +0000 (15:51 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 25 Jul 2014 14:34:01 +0000 (15:34 +0100)
commitda75a9aaf0064de4be0736983db08111701ccdae
tree3cbd67d65effa7bdc2f7f4cd7accdf62449a77ae
parent33a1a17f50bc9211691fd822c43226121e026cbe
python: fix _json module arbitrary process memory read vulnerability

http://bugs.python.org/issue21529

Python 2 and 3 are susceptible to arbitrary process memory reading by
a user or adversary due to a bug in the _json module caused by
insufficient bounds checking.

The sole prerequisites of this attack are that the attacker is able to
control or influence the two parameters of the default scanstring
function: the string to be decoded and the index.

The bug is caused by allowing the user to supply a negative index
value. The index value is then used directly as an index to an array
in the C code; internally the address of the array and its index are
added to each other in order to yield the address of the value that is
desired. However, by supplying a negative index value and adding this
to the address of the array, the processor's register value wraps
around and the calculated value will point to a position in memory
which isn't within the bounds of the supplied string, causing the
function to access other parts of the process memory.

(From OE-Core rev: 9ec213bf67afbdfdbe25802ec86487bb22aeb2e4)

Signed-off-by: Benjamin Peterson <benjamin@python.org>
Applied to python-native recipe in order to fix the above mentioned
vulnerability.

Upstream-Status: Submitted

Signed-off-by: Daniel BORNAZ <daniel.bornaz@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python-native_2.7.3.bb
meta/recipes-devtools/python/python/json-flaw-fix.patch [new file with mode: 0644]
meta/recipes-devtools/python/python_2.7.3.bb