delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/03/12/13:59:22

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
References: <47D4A7E4 DOT 5070509 AT tlinx DOT org> <47D4B7D2 DOT 1F78DADB AT dessent DOT net> <47D4E892 DOT 1090305 AT tlinx DOT org> <47D50BB6 DOT EFB28302 AT dessent DOT net> <47D6056B DOT 6000805 AT tlinx DOT org> <47D610C2 DOT EECE7EE9 AT dessent DOT net> <00b601c8843a$d94fe2c0$2708a8c0 AT CAM DOT ARTIMI DOT COM> <47D7EFEC DOT 122C76AE AT dessent DOT net> <00d001c88456$9f75a3c0$2708a8c0 AT CAM DOT ARTIMI DOT COM> <47D7FDDB DOT 73ABB705 AT dessent DOT net> <00dd01c8845c$078e8ee0$2708a8c0 AT CAM DOT ARTIMI DOT COM> <47D811CF DOT F40482C5 AT dessent DOT net>
Subject: RE: Bug: C-prog from Win dies in fork; gdb.exe also won't run
Date: Wed, 12 Mar 2008 18:58:37 -0000
Message-ID: <00e601c88473$145920b0$2708a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <47D811CF.F40482C5@dessent.net>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Brian Dessent wrote on 12 March 2008 17:25:

> a) figure out which module of the process is the main one
> b) look up its ImageBase
> c) compute which page in that processes' VM corresponds to that
> ImageBase plus some magic offset (which also implicitly means that all
> subsystems must use exactly the same image header format for
> the entire
> lifespan of the operating system, a pretty lousy way to
> design a kernel)
> d) query the memory manager if that page is currently in the
> working set
> e) incurr a page fault if it is not
> f) wait for the disk manager to page in that sector from the pagefile,
> or from the image on the filesystem if the page has not been modified

  Brian?  We're in kernel mode here, but we aren't in a device driver
interrupt or DPC in some random process context; we're running in the
process space of the calling process, and can just read or write it like
ordinary memory.

> ... And doing this for every syscall?!?  

  No, since the code that implements this restriction is *only* executed
when you call NtSetInformationProcess with class equal to 9
(ProcessAccessToken).

> And that doesn't even begin to
> address the most obvious of security issues of having the
> kernel rely on
> userspace structures when enforcing access restrictions.

  MS are not known for being entirely clever about security.

  Anyway, I don't want to speculate.  I want to get my hands on a Vista
machine and go digging around with WinDbg.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019