From: Paul Jakma <paul@clubi.ie>
To: AXP-list <axp-list@redhat.com>
Subject: Re: Uh...this looks bad.
Date: Wed, 24 Jan 2001 02:17:14 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.31.0101230549370.15972-100000@fogarty.jakma.org> (raw)
In-Reply-To: <Pine.LNX.4.30.0101211824220.10134-100000@res104a-017.rh.rit.edu>
On Sun, 21 Jan 2001, Andrew A. Gill wrote:
As i understand it:
> I get the following output:
>
> --- This has been edited, but it looks like the info is correct. ---
> (null)
you ran it with no arguments, right? that's the terminator for
*argv[].
then you don't check that i<argc and you continue on and start
accessing memory beyond *argv[]:
> PWD=
> HOSTNAME=
> QTDIR=
> LESSOPEN=
> KDEDIR=
> USER=
> LS_COLORS=
> MACHTYPE=
> MAIL=
> INPUTRC=
> BASH_ENV=
> LOGNAME=
> SHLVL=
> SHELL=
> USERNAME=
> HOSTTYPE=
> OSTYPE=
> HISTSIZE=
this means your environment variables are stored in the memory
directly after *argv[].
Eventually *argv[i] ends up referencing memory that has not been
allocated to you, and so kernel issues your programme a SIGSEGV when
your printf() tries to deference it.
> It seems like this might provide too much information to a possibly
> malicious user.
your test programme is setuid? :)
regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org
PGP5 key: http://www.clubi.ie/jakma/publickey.txt
-------------------------------------------
Fortune:
Lots of folks confuse bad management with destiny.
-- Frank Hubbard
prev parent reply other threads:[~2001-01-24 2:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-21 23:51 Uh...this looks bad Andrew A. Gill
2001-01-22 1:01 ` John Jasen
2001-01-22 4:52 ` multia with the 2.2.16-3 kernel jharris
2001-01-22 5:17 ` Matt Wilson
2001-01-22 2:14 ` Uh...this looks bad Matt Wilson
2001-01-24 2:17 ` Paul Jakma [this message]
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