mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Richard Weinberger <richard@nod.at>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	Joakim Tjernlund <joakim.tjernlund@transmode.se>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: ls -l /proc/1/exe -> Permission denied
Date: Mon, 21 Jul 2014 10:48:55 -0700	[thread overview]
Message-ID: <87k376siuw.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <53CBB143.1020206@nod.at> (Richard Weinberger's message of "Sun, 20 Jul 2014 14:08:35 +0200")

Richard Weinberger <richard@nod.at> writes:

> Am 20.07.2014 13:51, schrieb Andreas Schwab:
>> Richard Weinberger <richard.weinberger@gmail.com> writes:
>>> Do you have an example?
>> 
>> proc symlinks are special because they actually resolve to the inode.
>
> Ah. If an attacker manages the kernel to follow the symlink he could
> indirectly access that file.
> Thanks for pointing this out!

We only allow this access for processes that we are allowed to ptrace
because knowing intimate details of a process such as which files it has
open and in this case which file it is executing can make it more
attackable. (Say by looking to see if a processes is still running some
old vulnerable version and hasn't been restarted yet).

Normally this only applies to processes owned by different users.

However some configurations restrict ptrace on processes that you own.
You will have to look at the ``security'' modules you have enabled
and configured to see what that policy is, to see why you aren't allowed
to access your own processes.

Eric

      reply	other threads:[~2014-07-21 17:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 11:18 Joakim Tjernlund
2014-07-18 12:58 ` Richard Weinberger
2014-07-18 13:49   ` Joakim Tjernlund
     [not found]   ` <OF542E7A59.842197B0-ONC1257D19.004B7FF4-C1257D19.004BEC7C@LocalDomain>
2014-07-18 15:05     ` Joakim Tjernlund
2014-07-19 20:06       ` Richard Weinberger
2014-07-19 20:21 ` Andreas Schwab
2014-07-20  9:02   ` Joakim Tjernlund
2014-07-20 10:55     ` Andreas Schwab
2014-07-20 11:06       ` Richard Weinberger
2014-07-20 11:19         ` Joakim Tjernlund
2014-07-20 11:51         ` Andreas Schwab
2014-07-20 12:05           ` Richard Weinberger
2014-07-20 12:05           ` Richard Weinberger
2014-07-20 19:15             ` Joakim Tjernlund
2014-07-20 20:00               ` Richard Weinberger
2014-07-20 22:05                 ` Joakim Tjernlund
2014-07-20 12:08           ` Richard Weinberger
2014-07-21 17:48             ` Eric W. Biederman [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=87k376siuw.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=joakim.tjernlund@transmode.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=schwab@linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome