All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to open files a process has mmapped
Date: Sun, 07 Apr 2002 15:19:05 -0500	[thread overview]
Message-ID: <3CB0A9B9.8050309@acm.org> (raw)
In-Reply-To: <E16tuKm-0002Kp-00@the-village.bc.nu>

Alan Cox wrote:

>>a file a process has mmap-ed.  The trouble is that the file might be 
>>deleted (this is actually likely in this scenario) so I can't just open 
>>the file listed in /proc/<pid>/maps
>>
>Well perhaps they should not have deleted it
>
>>I have looked some at this, and I haven't come up with a good solution 
>>for this.  I have come up with the following solutions:
>>
>You forgot fix the program to do sensible things. You can pass file handles
>over AF_UNIX sockets for example, or you could rename the file so you can
>find it then delete it later
>
The customer is used to doing this on another operating system, and they 
have a system already designed that works this way.  I agree that there 
are more sensible solutions, but I have to think about this from my 
customer's point of view.  If a simple way to do this existed, it would 
save them time.

>>The last solution I could think of was to provide a way to open a file 
>>with using the major/minor/inode (since these are listed for the mapped 
>>files in the /proc/<pid>/maps file).  This is kind of ugly, but it's 
>>probably the best one I've thought of.
>>
>Nice way to do security holes
>
Obviously, this would be a root-only thing.  I don't think it opens up 
anything more than root already has, does it?  Or am I missing something?

-Corey


      reply	other threads:[~2002-04-07 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-05 15:58 How to open files a process has mmapped Corey Minyard
2002-04-06 17:50 ` Alan Cox
2002-04-07 20:19   ` Corey Minyard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CB0A9B9.8050309@acm.org \
    --to=minyard@acm.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.