From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 4994 invoked from network); 6 Mar 1998 16:32:49 -0000 Received: from gunn.kednos.com (HELO kednos.com) (198.68.96.5) by mail2.redhat.com with SMTP; 6 Mar 1998 16:32:49 -0000 Received: by kednos.com; (5.57/1.1.8.2/19Sep94-0756PM) id AA12781; Fri, 6 Mar 98 08:32:49 -0800 Date: Fri, 6 Mar 1998 08:32:49 -0800 (PST) From: Tom Linden To: axp-list@redhat.com Subject: Re: gdb & __stxncpy.S for alpha In-Reply-To: <199803061536.IAA05678@ellpspace.math.ualberta.ca> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I agree with this approach. You might first try stopi in __strxncpy.s go where The theory being that if you are stomping on your stack, this might catch it first. Can't remember if this breaks before prolog code, but I think it may On Fri, 6 Mar 1998, Michal Jaegermann wrote: > 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 > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com > >