[issue31897] Unexpected exceptions in plistlib.loads

2017-10-30 Thread Ned Williamson
Ned Williamson <nedwilliam...@gmail.com> added the comment: Thank you for the quick PR! I will report as behavior next time. I'm also following the library reference and reporting only unexpected exceptions. I trust you to reject any bugs that are expected functionality. I may fol

[issue31897] RecursionError in plistlib.loads

2017-10-29 Thread Ned Williamson
Ned Williamson <nedwilliam...@gmail.com> added the comment: ``` import plistlib dat = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00AAAnAAA' plistlib.loads(dat, fmt=plistlib.FMT_BINARY) ``` raises ``` Traceback (most recent cal

[issue31897] RecursionError in plistlib.loads

2017-10-29 Thread Ned Williamson
Ned Williamson <nedwilliam...@gmail.com> added the comment: ``` import plistlib dat = b'AAAwAAA\xc9A\x9cAA\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00A\x04\xb2\xaaAA' plistlib.loads(dat, fmt=plistlib.FMT_BINARY) ``` raises ``` Traceback (most recen

[issue31897] RecursionError in plistlib.loads

2017-10-29 Thread Ned Williamson
Ned Williamson <nedwilliam...@gmail.com> added the comment: I'm filing related bugs under this same issue. ``` import plistlib dat = b'Q\xe4\xfeAIwAAA\xc9A\xc1AAA\xc1AAA\x9cAAnAAA\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00

[issue31897] RecursionError in plistlib.loads

2017-10-29 Thread Ned Williamson
Ned Williamson <nedwilliam...@gmail.com> added the comment: The crashing version numbers are from testing on the release Python 3.5, but I think we can just fix this in 3.7+. -- ___ Python tracker <rep...@bugs.python.org> <https://

[issue31897] RecursionError in plistlib.loads

2017-10-29 Thread Ned Williamson
New submission from Ned Williamson <nedwilliam...@gmail.com>: Hi, The following program crashes for me using the current Python3.7 master: ``` import plistlib plistlib.loads(b'\xdd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' b'\xda\x0cw\xb7\x00\x00\x00\x00\x00\x00\x00\x

[issue30828] Out of bounds write in _asyncio_Future_remove_done_callback

2017-07-02 Thread Ned Williamson
New submission from Ned Williamson: This is very similar to the issue reported in https://bugs.python.org/issue28963 - this function is still buggy when items are pushed onto the done callbacks, as the new list is assumed to be large enough. The issue was pointed out on the code review page

[issue28963] Use-after-free in _asynciomodule.c

2016-12-13 Thread Ned Williamson
Ned Williamson added the comment: yselivanov, ah I think you're right. I misread that function after I noticed the issue in the first one. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28963] Use-after-free in _asynciomodule.c

2016-12-13 Thread Ned Williamson
New submission from Ned Williamson: There are two cases of use-after-free in the new Modules/_asynciomodule.c in the release candidate for Python 3.6, but I'm filing these together because it's the same underlying issue. In both cases in this file where the unsafe `PyList_GET_ITEM` is called

[issue25943] Integer overflow in _bsddb leads to heap corruption

2015-12-24 Thread Ned Williamson
New submission from Ned Williamson: In function `_db_associateCallback` of the `_bsddb` module, associating two databases with a callback that returns a sufficiently large list will lead to heap corruption due an integer overflow on 32-bit Python. >From `_bsddb.c`: ``` e

[issue25945] Type confusion in partial_setstate and partial_call leads to memory corruption

2015-12-24 Thread Ned Williamson
New submission from Ned Williamson: static PyObject * partial_setstate(partialobject *pto, PyObject *state) { PyObject *fn, *fnargs, *kw, *dict; if (!PyArg_ParseTuple(state, "", , , , )) return NULL; Py_XDECREF(pto->fn); Py_XDEC

[issue25945] Type confusion in partial_setstate and partial_call leads to memory corruption

2015-12-24 Thread Ned Williamson
Changes by Ned Williamson <nedwilliam...@gmail.com>: -- components: +Library (Lib) ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue25944] Type confusion in partial_setstate and partial_repr leads to control flow hijack

2015-12-24 Thread Ned Williamson
New submission from Ned Williamson: static PyObject * partial_setstate(partialobject *pto, PyObject *state) { PyObject *fn, *fnargs, *kw, *dict; if (!PyArg_ParseTuple(state, "", , , , )) return NULL; Py_XDECREF(pto->fn); Py_XDEC