Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Sep 1998 16:18:13 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Harold Gutch <logix@foobar.franken.de>
Cc:        John Polstra <jdp@polstra.com>, bwithrow@BayNetworks.COM, hackers@FreeBSD.ORG
Subject:   Re: GDB modifies shared libraries? 
Message-ID:  <199809172318.QAA01195@dingo.cdrom.com>
In-Reply-To: Your message of "Thu, 17 Sep 1998 23:35:17 %2B0200." <19980917233517.22291@foobar.franken.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Thu, Sep 17, 1998 at 09:32:08AM -0700, John Polstra wrote:
> > > GDB problem.  But I don't understand how GDB can override protections
> > > on /usr/lib/libc.so.3.1 in order to change its date.  This seems like
> > > an OS bug.
> > 
> > Yes, it is a kernel bug.  As far as I know, it doesn't actually modify
> > the file -- it just "updates" it with its original contents, changing
> > the timestamp.
> > 
> Is this really all this bug can do ? Update an arbitrary (?) file
> with it's original contents again ?

Yes.

> Or is it possible to overwrite arbitrary files with arbitrary or
> random data if "options KTRACE" (or whatever allows this in the
> kernel) is in the configfile ?

No.

What appears to happen is that one or more pages in the text section are
marked dirty (for some unknown reason) and thus written out.  The page
contents themselves are read-only, so they can't be modified.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809172318.QAA01195>