From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 3CF372EFEB for ; Tue, 23 Jan 2001 21:17:18 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f0O2H3l24438 for axp-list@listman.redhat.com; Tue, 23 Jan 2001 21:17:03 -0500 Received: from hibernia.jakma.org (IDENT:root@hibernia.clubi.ie [212.17.32.129]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f0O2H1d24430 for ; Tue, 23 Jan 2001 21:17:01 -0500 Received: from fogarty.jakma.org (IDENT:root@fogarty.jakma.org [192.168.0.4]) by hibernia.jakma.org (8.11.1/8.11.1) with ESMTP id f0O2HFd03397 for ; Wed, 24 Jan 2001 02:17:15 GMT Received: from localhost (paul@localhost) by fogarty.jakma.org (8.11.1/8.11.1) with ESMTP id f0O2HF518918 for ; Wed, 24 Jan 2001 02:17:15 GMT X-Authentication-Warning: fogarty.jakma.org: paul owned process doing -bs Date: Wed, 24 Jan 2001 02:17:14 +0000 (GMT) From: Paul Jakma X-X-Sender: To: AXP-list Subject: Re: Uh...this looks bad. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors 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 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