bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffer overflow in cp and mv commands


From: James Youngman
Subject: Re: Buffer overflow in cp and mv commands
Date: Sun, 12 Jun 2005 17:44:53 +0100
User-agent: Mutt/1.3.28i

On Sat, Jun 11, 2005 at 09:41:20PM -0400, Gregory Butenko wrote:
> I have compiled coreutils with hardened gcc and now the following 
> messages pop up when subtrees copied or moved:
>        mv: stack smashing attack in function copy_internal()
>              or
>        cp: stack smashing attack in function copy_internal()
> 
> That is a good sign of a buffer overflow bug. Could someone fix that?

First, thanks for the bug report.

I can't see any immediately obvious sign of a buffer overflow in
copy_internal().  Could you perhaps expand your bug report to include
more details of the bug you are reporting?

> I run Linux on PPC with 64MB memory and this bug shows up when there is 
> not enough memory, I believe.

The only memory allocation in that function that I can see is
ASSIGN_STRDUPA(), which will always allocate the correct size of
buffer or call abort(), I believe.  

Regards,
James.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]