[PATCH 1/2 v2] Don't overflow in __libdw_in_section

Mark Wielaard mark@klomp.org
Wed Dec 20 18:05:00 GMT 2017


On Thu, 2017-12-14 at 14:55 +0100, Ulf Hermann wrote:
> On 12/14/2017 02:43 PM, Mark Wielaard wrote:
> > The transformation seems correct. But if we can overflow/underflow
> > here, do we have the same problem in __libdw_offset_in_section
> > where we
> >   check data->d_size - offset < size, with offset a Dwarf_Off?
> 
> Probably we have the same problem there. I didn't catch any instances
> of it, though.

It is surprising we didn't see more issues with this code. There is
also the fake loc cu that fetches data from a different section. I
updated both functions as attached.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Don-t-overflow-in-__libdw_in_section-and-__libdw_off.patch
Type: text/x-patch
Size: 1929 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/elfutils-devel/attachments/20171220/7c8d9a15/attachment.bin>


More information about the Elfutils-devel mailing list