Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
To: axp-list@redhat.com
Subject: Re: gdb & __stxncpy.S for alpha
Date: Fri, 6 Mar 1998 08:36:35 -0700 (MST)	[thread overview]
Message-ID: <199803061536.IAA05678@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <3500098B.5B22CAC4@voicenet.com> from "Uncle George" at Mar 6, 98 09:34:53 am

Uncle George wrote:
> 
> what does this have to do with the kernel. __strxncpy.S is defined in
> sysdeps/alpha of glibc.
> i Mean i cannot do a gdb "where" on this function, as it does not go up the
> stack .

Debuggers rely on some conventions followed by compilers when they
try to unwind a stack.  If you are hacking some low level function in
an assembler you are free to disregard these conventions and apply
shortcuts.  This, of course, does wonders for a debugging if you try
a backtrace from inside of such "weird" code.  I do not know if this
is the case here.

The other possible source of a grief is when you are tracing a bug which
writes over your stack.  Writes beyond limits of an array allocated
on stack, for example.  This, naturally, has a pretty good chance to
destroy precisely that information you are after when you attempt "where"
in a debugger.  Even if something prints it may have nothing even close
with reality.  If you are totally in a dark what may be causing this your
only recourse is to trace patiently your program, breaking deeper and
deeper on each trial run, until you will find what is killing your stack.

The last bug is likely the most popular entry point to crack attacks.
Instead of writing a garbage on a stack of a victim program you are
putting there carefully crafted data so a continued execution will do
something not-intended, like giving you a root shell, instead of just
simply crashing with a bogus backtrace.

  Michal


  reply	other threads:[~1998-03-06 15:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-06 12:16 gdb & __stxncpy.S for alpha Uncle George
1998-03-06 12:23 ` warp
1998-03-06 14:34   ` Uncle George
1998-03-06 15:36     ` Michal Jaegermann [this message]
1998-03-06 16:32       ` Tom Linden
1998-03-06 16:36       ` Uncle George
1998-03-09 16:57 ` Richard Henderson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox