selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Petr Lautrbach <plautrba@redhat.com>, selinux@vger.kernel.org
Cc: Ondrej Mosnacek <omosnace@redhat.com>
Subject: Re: [PATCH v5] libselinux: Eliminate use of security_compute_user()
Date: Tue, 11 Feb 2020 10:04:35 -0500	[thread overview]
Message-ID: <46e177f4-bd5b-5c69-f8a6-acf1736bc62e@tycho.nsa.gov> (raw)
In-Reply-To: <20200211101438.403297-1-plautrba@redhat.com>

On 2/11/20 5:14 AM, Petr Lautrbach wrote:
> get_ordered_context_list() code used to ask the kernel to compute the complete
> set of reachable contexts using /sys/fs/selinux/user aka
> security_compute_user(). This set can be so huge so that it doesn't fit into a
> kernel page and security_compute_user() fails. Even if it doesn't fail,
> get_ordered_context_list() throws away the vast majority of the returned
> contexts because they don't match anything in
> /etc/selinux/targeted/contexts/default_contexts or
> /etc/selinux/targeted/contexts/users/
> 
> get_ordered_context_list() is rewritten to compute set of contexts based on
> /etc/selinux/targeted/contexts/users/ and
> /etc/selinux/targeted/contexts/default_contexts files and to return only valid
> contexts, using security_check_context(), from this set.
> 
> Fixes: https://github.com/SELinuxProject/selinux/issues/28
> 
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

This looks fine to me; I'll wait to see if Ondrej has any further 
comments, but you can add my:

Acked-by: Stephen Smalley <sds@tycho.nsa.gov>

Then maybe in a decade we can actually remove /sys/fs/selinux/user...


  reply	other threads:[~2020-02-11 15:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 10:14 [PATCH v5] libselinux: Eliminate use of security_compute_user() Petr Lautrbach
2020-02-11 15:04 ` Stephen Smalley [this message]
2020-02-11 21:19 ` Ondrej Mosnacek
2020-02-12 10:13   ` Petr Lautrbach
2020-02-12 10:41   ` Petr Lautrbach
2020-02-12 16:01 ` Stephen Smalley

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=46e177f4-bd5b-5c69-f8a6-acf1736bc62e@tycho.nsa.gov \
    --to=sds@tycho.nsa.gov \
    --cc=omosnace@redhat.com \
    --cc=plautrba@redhat.com \
    --cc=selinux@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).