All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Cc: FabF <fabian.frederick@skynet.be>, linux-kernel@vger.kernel.org
Subject: Re: question about /proc/<PID>/mem in 2.4
Date: Tue, 6 Jul 2004 08:04:36 -0300	[thread overview]
Message-ID: <20040706110436.GA11441@logos.cnet> (raw)
In-Reply-To: <Pine.LNX.4.44.0407061210190.20027-100000@localhost.localdomain>

On Tue, Jul 06, 2004 at 12:14:04PM +0100, Tigran Aivazian wrote:
> On Mon, 5 Jul 2004, FabF wrote:
> > > Surely, the super user (i.e. CAP_SYS_PTRACE in this context) should be 
> > > allowed to read any process' memory without having to do the 
> > > PTRACE_ATTACH/PTRACE_PEEKUSER kind of thing which strace(8) is doing?
> > 
> > FYI may_ptrace_attach plugged somewhere between 2.4.21 & 22.This one get
> > used as is (ie without MAY_PTRACE) in proc_pid_environ but dunno about
> > reason why CAP_SYS_PTRACE isn't authoritative elsewhere.
> 
> Ok, but still nobody seems to know why the super user is not allowed to
> access /proc/<PID>/mem of any task. Any code which nobody in the world
> knows the reason for, is broken and should be removed.
> 
> I will wait a few weeks to see if someone does come up with the reason for
> that "extra secure" check in mem_read() and if nobody has objections I'll
> send Linus a patch to relax the check to a more reasonable one, namely to
> allow CAP_SYS_PTRACE process to bypass any other conditions imposed.

Hi Tigran, 

This code was added to stop the ptrace/kmod vulnerabilities. I do not 
fully understand the issues around tsk->is_dumpable and the fix itself,
but I agree on that the checks here could be relaxed for the super user.

However changing it to 

        if (!is_dumpable(task) && !capable(CAP_SYS_PTRACE))
                goto out;

Seems wrong because this will stop always honoring the tsk->is_dumpable flag. (?)

Alan for sure can make the picture clear - he wrote this thing.
                                                                                                                                                                                   


  parent reply	other threads:[~2004-07-06 11:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-05 13:27 question about /proc/<PID>/mem in 2.4 Tigran Aivazian
2004-07-05 13:37 ` FabF
2004-07-05 14:22   ` Tigran Aivazian
2004-07-05 14:25     ` FabF
2004-07-06 11:14       ` Tigran Aivazian
2004-07-06 10:49         ` Arjan van de Ven
2004-07-06 11:35           ` Tigran Aivazian
2004-07-06 11:04         ` Marcelo Tosatti [this message]
2004-07-06 13:08           ` Tigran Aivazian
2004-07-06 16:31             ` Alan Cox
2004-07-07 13:53               ` Tigran Aivazian
2004-07-07 13:26                 ` Tigran Aivazian
2004-07-07 16:21                   ` Daniel Jacobowitz
2004-07-07 16:13                 ` Alan Cox

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=20040706110436.GA11441@logos.cnet \
    --to=marcelo.tosatti@cyclades.com \
    --cc=fabian.frederick@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tigran@aivazian.fsnet.co.uk \
    /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.