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

2017-12-21 Thread Mark Wielaard
On Thu, Dec 21, 2017 at 02:47:49PM +0100, Ulf Hermann wrote: > > 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. > > Looks good to me. Thanks for taking a look. Pushe

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

2017-12-21 Thread Ulf Hermann
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. Looks good to me. Ulf

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

2017-12-20 Thread Mark Wielaard
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

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

2017-12-14 Thread Ulf Hermann
On 12/14/2017 02:43 PM, Mark Wielaard wrote: > (Meta, I have some trouble applying this with git am, it thinks the > patch is malformed. But I can apply by hand of course.) Oh, sorry for that. It's probably the leading spaces again. I keep messing up my mail setup on windows ... > The transforma

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

2017-12-14 Thread Mark Wielaard
Hi Ulf, (Meta, I have some trouble applying this with git am, it thinks the patch is malformed. But I can apply by hand of course.) On Fri, 2017-12-08 at 16:05 +0100, Ulf Hermann wrote: > > +2017-05-09  Ulf Hermann   > + > + * libdwP.h: Fix check for the upper border of the range in  > __lib

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

2017-12-08 Thread Ulf Hermann
This exposes a bug in dwarf_formstring as detected by the dwarf-getmacros test. We cannot unconditionally assume that a string is in either the IDX_debug_info or the IDX_debug_types section as determined by cu_sec_idx. (Signed-off instead of Change-Id ...) Signed-off-by: Ulf Hermann --- libdw/