All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: Andrew Griffiths <andrewg@tasmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ptrace allows you to read -r files
Date: Mon, 4 Feb 2002 22:06:28 -0500	[thread overview]
Message-ID: <20020204220628.A2229@nevyn.them.org> (raw)
In-Reply-To: <200202050033.g150XVn17613@picton-ext.nt.tas.gov.au>
In-Reply-To: <200202050033.g150XVn17613@picton-ext.nt.tas.gov.au>

On Tue, Feb 05, 2002 at 11:33:32AM +1100, Andrew Griffiths wrote:
> Hello everyone,
> 
> While playing around I noticed that if I fork()ed, then did ptrace(PTRACE_TRACEME,...) then exec'd a non-readable binary, the ptrace interface would let me read the binary.
> 
> This was tested on 2.4.17ctx-5 (the security context patch), however I have been told it works on vanilla kernels, also I tested it on 2.4.2-pax on an old machine. (pentium 75...)
> 
> For those who want some demo code, you can find it at http://203.39.161.186/readbin.tgz.
> 
> For testing it, I used /usr/bin/ssh which was rws--x--x.
> 
> Since I'm not subscribed to this list, could any replies be cc'd to me? Thanks.

I think this is just 'known'.  Note that it isn't a security problem
otherwise; you'll find that the setuid application does not setuid if
it is ptraced.  On 2.4.17 at least.


-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

  reply	other threads:[~2002-02-05  3:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05  0:33 ptrace allows you to read -r files Andrew Griffiths
2002-02-05  3:06 ` Daniel Jacobowitz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-02-05 10:12 Andrew Griffiths

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=20020204220628.A2229@nevyn.them.org \
    --to=dan@debian.org \
    --cc=andrewg@tasmail.com \
    --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.