cpython/Misc/NEWS.d/next/Core and Builtins
Philipp Gesang cb1c0746f2
closes bpo-39510: Fix use-after-free in BufferedReader.readinto() (GH-18295)
When called on a closed object, readinto() segfaults on account
of a write to a freed buffer:

    ==220553== Process terminating with default action of signal 11 (SIGSEGV): dumping core
    ==220553==  Access not within mapped region at address 0x2A
    ==220553==    at 0x48408A0: memmove (vg_replace_strmem.c:1272)
    ==220553==    by 0x58DB0C: _buffered_readinto_generic (bufferedio.c:972)
    ==220553==    by 0x58DCBA: _io__Buffered_readinto_impl (bufferedio.c:1053)
    ==220553==    by 0x58DCBA: _io__Buffered_readinto (bufferedio.c.h:253)

Reproducer:

    reader = open ("/dev/zero", "rb")
    _void  = reader.read (42)
    reader.close ()
    reader.readinto (bytearray (42)) ### BANG!

The problem exists since 2012 when commit dc469454ec added code
to free the read buffer on close().

Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
2020-02-04 13:25:16 -08:00
..
2019-12-03-16-41-22.bpo-38960.kvoFM0.rst bpo-38960: DTrace build fix for FreeBSD. (GH-17451) 2020-01-28 13:53:32 +01:00
2019-12-30-15-56-07.bpo-36051.imaVlq.rst bpo-36051: Drop GIL during large bytes.join() (GH-17757) 2020-01-29 16:09:24 +09:00
2020-01-15-15-50-22.bpo-39320.oWARyk.rst bpo-39320: Handle unpacking of **values in compiler (GH-18141) 2020-01-27 09:57:45 +00:00
2020-01-24-01-07-04.bpo-39434.S5ehj9.rst bpo-39434: Improve float __floordiv__ performance and error message (GH-18147) 2020-01-30 13:23:15 +00:00
2020-01-25-23-51-17.bpo-39453.xCOkYk.rst bpo-39453: Make list.__contains__ hold strong references to avoid crashes (GH-18181) 2020-01-27 15:02:23 +00:00
2020-01-30-01-14-42.bpo-39492.eTuy0F.rst bpo-39492: Fix a reference cycle between reducer_override and a Pickler instance (GH-18266) 2020-02-02 10:55:21 -08:00
2020-02-04-10-27-41.bpo-39510.PMIh-f.rst closes bpo-39510: Fix use-after-free in BufferedReader.readinto() (GH-18295) 2020-02-04 13:25:16 -08:00
README.rst

Put news entry `blurb`_ files for the *Core and Builtins* section in this directory.

.. _blurb: https://pypi.org/project/blurb/