This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: buffer overflow with ar
- From: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Binutils List <binutils at sources dot redhat dot com>, Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Date: Thu, 07 Jul 2005 14:00:56 +0200
- Subject: Re: buffer overflow with ar
- References: <1120582504.30532.22.camel@mccallum.corsepiu.local> <42CD15BA.8000606@redhat.com>
On Thu, 2005-07-07 at 12:44 +0100, Nick Clifton wrote:
> Hi Ralf,
>
> > When trying to use a cross-ar from vanilla binutils-2.16 or
> > binutils-2.16.1 on FC4, I am observing this
> >
> > # arm-rtems4.7-ar rc ./libgcc.a libgcc/./_udivsi3.o
> > *** buffer overflow detected ***: arm-rtems4.7-ar terminated
>
> > /lib/libc.so.6(__sprintf_chk+0x30)[0x1eee24]
> > arm-rtems4.7-ar[0x804f5f6]
>
>
> > I there a fix/work-around?
>
> Not yet.
>
> > Is it a binutils or FC problem?
>
> binutils.
OK, then I'd assume it's FC's FORTIFY revealing a memory leak in ar ;)
> > I hardly can believe nobody has been facing this issue before, but
> > haven't tried to investigate in depth, yet.
>
> Can you run this under a debugger and find out which call to sprintf is
> overflowing, and what the parameters are ?
I'll try to do, ASAP. For the moment, as a work-around, I have disabled
FORTIFY and ar is silent, again ;)
Ralf