From: Klaus Weidner <klaus@atsec.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eric Paris <eparis@redhat.com>,
Russell Coker <russell@coker.com.au>,
Michael C Thompson <thompsmc@us.ibm.com>,
Karl MacMillan <kmacmillan@mentalrootkit.com>,
Joshua Brindle <jbrindle@tresys.com>,
Darrel Goeddel <dgoeddel@TrustedCS.com>,
Steve Grubb <sgrubb@redhat.com>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: MLS login (Was: Re: newrole - adding capabilities for polyinstantiation)
Date: Thu, 5 Oct 2006 17:02:28 -0500 [thread overview]
Message-ID: <20061005220228.GC28525@w-m-p.com> (raw)
In-Reply-To: <1160075077.2132.181.camel@moss-spartans.epoch.ncsc.mil>
On Thu, Oct 05, 2006 at 03:04:37PM -0400, Stephen Smalley wrote:
> On Thu, 2006-10-05 at 11:08 -0500, Klaus Weidner wrote:
> > I think the sane behaviors for MLS login would be any of the following:
> >
> > - for local VTs or serial terminals, login at the default level,
> > and permit using newrole to change level (or role). newrole relabels
> > the tty device to match. Alternatively, choosing a context when
> > logging in would be ok.
> >
> > - when using SSH with labeled networking, the network connection has a
> > MLS label corresponding to the sending process (ssh client), and the
> > login session gets this MLS level if it's within the user's clearance
> > range, otherwise the session is rejected.
>
> Just to be clear, this behavior would only occur if running sshd under
> xinetd, right? So that the sshd instance is run in the peer's range and
> is already bound by it? Otherwise, the normal sshd selinux support will
> just select a default context for the user without consideration of the
> peer label.
Yes, that's the current plan.
> > Newrole is not useful for
> > changing levels since the input or output stream won't be permitted
> > to communicate over the socket, but newrole can be used for launching
> > noninteractive programs that don't need to communicate with the pty.
>
> Not sure that will work presently without some changes to newrole.
It wouldn't be a required feature, I was just bringing it up as an
example of what would be compatible with the restrictions.
> > Maybe the easiest way to get this behavior is to ensure that relabeling
> > one end of a pty pair automatically relabels the other end too. Of
> > course, trusted apps can use MLS overrides, but sshd should not do so.
>
> I think sshd_t gets MLS overrides in policy, like other login-like
> domains, since it can create user sessions at various levels and sets
> the pty labels accordingly.
Argh, I wasn't aware that sshd has full MLS overrides:
TYPES:
sshd_t (11 attributes)
ssh_server
domain
can_change_process_identity
can_change_process_role
can_change_object_identity
mlsfileread
mlsfilewrite
mlsfileupgrade
mlsfiledowngrade
mlsprocsetsl
privfd
Doesn't this have even worse consequences? For example when sshd does
port forwarding, does that mean that a client can ask it to connect to
arbitrary ports using sshd's MLS overrides? Of course, the evaluated
config could disable port forwarding, but this makes it doubtful if sshd
is trustworthy in an MLS environment.
> > For the MLS levels, it shouldn't be necessary to modify sshd to support
> > the restrictions - on the contrary, the restrictions should happen
> > automatically since sshd doesn't have MLS override capabilities.
>
> ...except I think it does. The discussion seems a bit divorced from
> reality.
Yes, unfortunately reality seems to be deficient :-(
How about a completely different approach for the MLS system
configuration:
- restrict newrole to admins only
- create a new sshd_via_xinetd_t domain with restricted privileges that
doesn't change contexts and doesn't have general MLS overrides, just
whatever is necessary to make polyinstantiation work
- for regular user console login (or if not enforcing labeled
networking), create multiple Linux users for each human user that share
the same uid and home directory, and use "semanage login" to map them
to appropriate types. So you'd have smith_secret_cat1,
smith_unclassified and so on.
I know it's ugly, but would this be a strategy to get an LSPP/RBAC
compliant system in the near future without having to rewrite sshd,
newrole, the kernel pty drivers, or the other potentially affected areas?
Comments?
-Klaus
--
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.
next prev parent reply other threads:[~2006-10-05 22:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <451AEC39.2090409@us.ibm.com>
[not found] ` <1159450384.11489.5.camel@moss-spartans.epoch.ncsc.mil>
2006-09-28 21:10 ` newrole - adding capabilities for polyinstantiation Michael C Thompson
2006-09-29 19:42 ` Michael C Thompson
2006-09-29 20:51 ` Stephen Smalley
2006-10-03 22:40 ` Michael C Thompson
2006-10-03 23:52 ` Russell Coker
2006-10-04 16:19 ` Michael C Thompson
2006-10-04 18:53 ` Stephen Smalley
2006-10-04 16:22 ` Stephen Smalley
2006-10-04 20:20 ` Klaus Weidner
2006-10-05 0:45 ` Russell Coker
2006-10-05 16:08 ` Klaus Weidner
2006-10-05 19:04 ` MLS login (Was: Re: newrole - adding capabilities for polyinstantiation) Stephen Smalley
2006-10-05 22:02 ` Klaus Weidner [this message]
2006-10-04 14:52 ` newrole - adding capabilities for polyinstantiation Stephen Smalley
2006-10-04 16:31 ` Michael C Thompson
2006-10-04 16:52 ` Stephen Smalley
2006-10-04 22:39 ` Michael C Thompson
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=20061005220228.GC28525@w-m-p.com \
--to=klaus@atsec.com \
--cc=dgoeddel@TrustedCS.com \
--cc=eparis@redhat.com \
--cc=jbrindle@tresys.com \
--cc=kmacmillan@mentalrootkit.com \
--cc=russell@coker.com.au \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=sgrubb@redhat.com \
--cc=thompsmc@us.ibm.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 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.