All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: SELinux <selinux@tycho.nsa.gov>
Subject: Suggestion on fixing a old libselinux problem.
Date: Wed, 29 Feb 2012 15:47:27 -0500	[thread overview]
Message-ID: <4F4E8EDF.1030405@redhat.com> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

One of the oldest bugs/wacki things about SELinux is what happens when
a login program can not calculate a login context.

Right now we have an open bug on confined users.  Basically if you
setup a confined user guest_u and attempt to login to that user via
xdm_t, you get a context of guest_u:guest_r:oddjob_mkhomedir_t:s0

selinuxdefcon pwalsh system_u:system_r:xdm_t:s0
guest_u:guest_r:oddjob_mkhomedir_t:s0

Yech.

This could be considered a security hole, but it is definitely broken.
 I have been looking at the libselinux code but this is actually
expected behavior, and I am not eager to fix it, since it might break
peoples expectations.

Eric suggested that we might want to move the problem out of
libselinux and make this a login program problem.  Make the login
programs pam_selinux a userspace manager.

After libselinux returns a context to pam_selinux it would check for
the following allow rule.

allow logindomain userdomain:login entrypoint;

Then pam_namespace would check if xdm_t is allowed a login entry point
into oddjob_mkhomedir_t, if no, blow up the login.

Comments?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAk9Ojt8ACgkQrlYvE4MpobO3qQCXUS4MjJWZf1BFDWN6U7SssAL6
3gCgtKYcOb9+9A/A+GW1cwiKaR58CZY=
=Cm5O
-----END PGP SIGNATURE-----

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

             reply	other threads:[~2012-02-29 20:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 20:47 Daniel J Walsh [this message]
2012-02-29 21:22 ` Suggestion on fixing a old libselinux problem Stephen Smalley
2012-02-29 21:34   ` Stephen Smalley
2012-03-01 14:42     ` Daniel J Walsh
2012-03-02 17:46       ` Stephen Smalley
2012-03-02 21:14         ` Stephen Smalley
2012-03-01 18:35     ` Sven Vermeulen

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=4F4E8EDF.1030405@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /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.