mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Brown <matt@nmatt.com>
To: "Mickaël Salaün" <mic@digikod.net>,
	"Alan Cox" <gnomes@lxorguk.ukuu.org.uk>
Cc: james.l.morris@oracle.com, serge@hallyn.com,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	kernel-hardening@lists.openwall.com
Subject: Re: [PATCH v2 0/1] Add Trusted Path Execution as a stackable LSM
Date: Sun, 11 Jun 2017 20:04:59 -0400	[thread overview]
Message-ID: <d3b11dde-be5c-0bb8-6573-b331c593c9f7@nmatt.com> (raw)
In-Reply-To: <9d175249-c9f3-daba-bae4-f60dc97795e6@digikod.net>

On 06/11/2017 07:30 AM, Mickaël Salaün wrote:
>
> On 08/06/2017 21:01, Matt Brown wrote:
>> On 6/8/17 2:37 PM, Alan Cox wrote:
>>>> http://phrack.org/issues/52/6.html#article
>>>>
>>>> | A trusted path is one that is inside a root owned directory that
>>>> | is not group or world writable.  /bin, /usr/bin, /usr/local/bin, are
>>>> | (under normal circumstances) considered trusted.  Any non-root
>>>> | users home directory is not trusted, nor is /tmp.
>>>
>>> Note that in the real world the trusted path would and should also
>>> require that any elements of the path above that point are also locked
>>> down if you are using path based models. Ie you need to ensure nobody has
>>> the ability to rename /usr or /usr/local before you trust /usr/local/bin.
>>>
>>
>> So actually in this LSM it's not so much full paths that are trusted,
>> rather it checks that the directory containing the program is only
>> writable by root and that the program itself is only writable by root.
>>
>> For example, consider the following:
>>
>> /user/ with permissions drwxr-xr-x user user
>> /user/user-owned/ with permissions drwxr-xr-x user user
>> /user/user-owned/root-owned/ with permissions drwxr-xr-x root root
>> /user/user-owned/root-owned/exe with permissions -rwxr-xr-x root root
>
> Some tests would make this scenario clear. ;)
>
> You can take a look at how seccomp-bpf does with the test_harness.h
> helper. A new kselftest_harness.h will be available soon to not include
> a file from the seccomp-bpf directory (cf. linux-next).
>

I'll take a look at those. Thanks!

Matt

      reply	other threads:[~2017-06-12  0:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08  3:43 Matt Brown
2017-06-08  3:43 ` [PATCH v2 1/1] " Matt Brown
2017-06-09  2:38   ` Kees Cook
2017-06-09  3:50     ` Matt Brown
2017-06-09 10:18       ` Mimi Zohar
2017-06-09 12:55         ` Kees Cook
2017-06-09 13:15           ` Matt Brown
2017-06-09 13:16           ` Mimi Zohar
2017-06-09 13:18             ` [kernel-hardening] " Matt Brown
2017-06-09 13:44               ` Mimi Zohar
2017-06-16  2:25   ` kbuild test robot
2017-06-16  2:25   ` [RFC PATCH] print_tpe_error() can be static kbuild test robot
2017-06-08 18:37 ` [PATCH v2 0/1] Add Trusted Path Execution as a stackable LSM Alan Cox
2017-06-08 19:01   ` Matt Brown
2017-06-08 19:23     ` Alan Cox
2017-06-11 11:30     ` Mickaël Salaün
2017-06-12  0:04       ` Matt Brown [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=d3b11dde-be5c-0bb8-6573-b331c593c9f7@nmatt.com \
    --to=matt@nmatt.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=james.l.morris@oracle.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=serge@hallyn.com \
    /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

all inboxes | Powered by JetHome®