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.