All of lore.kernel.org
 help / color / mirror / Atom feed
From: antoine <antoine@nagafix.co.uk>
To: ivg2@cornell.edu
Cc: SELinux <selinux@tycho.nsa.gov>, walters@redhat.com
Subject: Re: mdadm policy
Date: Fri, 24 Jun 2005 19:02:40 +0100	[thread overview]
Message-ID: <1119636160.9645.46.camel@localhost> (raw)
In-Reply-To: <1119635200.31852.16.camel@celtics.boston.redhat.com>

On Fri, 2005-06-24 at 13:46 -0400, Ivan Gyurdiev wrote:
> > Well that's no comfort at all, mdadm_t domain has the ability to access
> > raw disks and send mail... That's worrying enough.
> 
> I don't see anything about sending mail, but perhaps
> I'm not looking hard enough. You're talking about adding this
> privilege?
Sorry, sending mail is not actually a function of mdadm (in code), it is
just a configuration option that pipes to sendmail:

>From the man page:

MAILADDR
The mailaddr line gives an E-mail address that alerts should be sent to
when is running in --monitor mode (and was given the --scan option).
There  should  only be one MAILADDR line and it should have only one
address.

PROGRAM
The  program  line  gives the name of a program to be run when mdadm
--monitor detects potentially interesting events on any of the arrays
that it is monitoring.
This program gets run with two or three arguments, they being the Event,
the md device, and possibly the related component device.
There should only be one program line and it should be give only one
program.


So it looks to me like the transition to sendmail should always be
included - well actually, ifdef(mta.te).

> > # RAID block device access
> > allow mdadm_t fixed_disk_device_t:blk_file create_file_perms;
> 
> hmm..yes..
> 
> Well, in this case, mdadm_t is the trusted domain,
> and you *want* to transition it to other domains upon execution
> of something that you don't trust.
> 
> So yes, if  you want want to send mail, you would add 
> a transition like this:
> domain_auto_trans(mdadm_t, sendmail_exec_t, sendmail_t (or whatever..))
> 
> What is this PROGRAM configurable option - can you describe in more 
> detail. I don't know anything about mdadm.
> 
> > I will tweak my policy to make it run sendmail in
> > sendmail_t and nothing else. That's safer than mdadm_t.
> 
> Perhaps this is something that should be in default policy - it
> sounds like a good threat model.

What should be the domain to transition to upon execution of bin/sbin?
Rather than using can_exec, I believe it should be:
domain_auto_trans(mdadm_t, bin_t, that_domain_t)
domain_auto_trans(mdadm_t, sbin_t, that_domain_t)
But personally, I'll leave that out and rely on the email notification.

Antoine


--
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:[~2005-06-24 18:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-23 23:27 mdadm policy antoine
2005-06-24  1:50 ` Ivan Gyurdiev
2005-06-24  9:35   ` antoine
2005-06-24 15:41     ` Ivan Gyurdiev
2005-06-24 15:58       ` Colin Walters
2005-06-24 16:35       ` antoine
2005-06-24 17:46         ` Ivan Gyurdiev
2005-06-24 18:02           ` antoine [this message]
2005-06-24 19:05             ` Ivan Gyurdiev
2005-06-24 19:27               ` antoine
2005-06-24 19:29                 ` Ivan Gyurdiev
2005-06-24 19:43                 ` Stephen Smalley
2005-06-25  3:42                 ` Daniel J Walsh
2005-06-24 19:47               ` Stephen Smalley
2005-06-24 11:29 ` 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=1119636160.9645.46.camel@localhost \
    --to=antoine@nagafix.co.uk \
    --cc=ivg2@cornell.edu \
    --cc=selinux@tycho.nsa.gov \
    --cc=walters@redhat.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.