From owner-freebsd-hackers Thu Sep 17 16:15:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA28904 for freebsd-hackers-outgoing; Thu, 17 Sep 1998 16:15:24 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA28880 for ; Thu, 17 Sep 1998 16:15:18 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id QAA01195; Thu, 17 Sep 1998 16:18:13 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199809172318.QAA01195@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Harold Gutch cc: John Polstra , bwithrow@BayNetworks.COM, hackers@FreeBSD.ORG Subject: Re: GDB modifies shared libraries? In-reply-to: Your message of "Thu, 17 Sep 1998 23:35:17 +0200." <19980917233517.22291@foobar.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 17 Sep 1998 16:18:13 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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