All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: "David P. Quigley" <dpquigl@tycho.nsa.gov>
Cc: Daniel J Walsh <dwalsh@redhat.com>,
	Paul Nuzzi <pjnuzzi@tycho.ncsc.mil>,
	russell@coker.com.au, selinux@tycho.nsa.gov,
	LSM <linux-security-module@vger.kernel.org>
Subject: Re: [PATCH] Dynamic port labeling V2
Date: Thu, 03 Dec 2009 18:32:41 -0800	[thread overview]
Message-ID: <4B1874C9.1000508@schaufler-ca.com> (raw)
In-Reply-To: <1259856069.8497.56.camel@moss-terrapins.epoch.ncsc.mil>

David P. Quigley wrote:
> On Wed, 2009-12-02 at 19:37 -0800, Casey Schaufler wrote:
>   
>> David P. Quigley wrote:
>>     
>>> On Tue, 2009-12-01 at 21:43 -0800, Casey Schaufler wrote:
>>>   
>>>       
>>>>> also what happens when other transport protocols come around like sctp
>>>>> for instance. now we need another 65k files for this as well.
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>> Ok, so it would appear that the notion of a fully populated
>>>> portfs has sufficient stumbling blocks to make it a non-starter.
>>>>
>>>> A dynamically maintained version, with default values for unallocated
>>>> ports and memory based xattrs stored on request would still be viable.
>>>>
>>>> Yes, it's more work. I'd rather see a generally useful scheme than an
>>>> SELinux specific one, if for no other reason than it makes the general
>>>> case harder to sell later on.
>>>>
>>>>     
>>>>         
>>>>> Dave
>>>>>
>>>>>
>>>>> --
>>>>>       
>>>>>           
>>> You still need to address my issue with port ranges.
>>>       
>> Why does the notions of port ranges make any sense at all? That
>> sounds an awful lot like name based access control from here, and
>> we know the evils of name based access controls. (smiley here)
>>     
>
> Because if I want to have set of ports labeled reserved_port_t or
> no_access_port_t and have a neverallow rule for no_access_port_t I have
> to iterate through every file that I want to have that. That is why a
> port range is useful.

If you're going to treat ports as named objects (things
that require labels) it seems as if the interfaces for
dealing with them ought not make it easy to make mistakes.
If you really care you don't want people doing things like

     set ports 1-9999 some_port_t
     set ports 77,802 another_port_t

and don't even think of trying to say that isn't what is
going to happen.


>  It sound nothing what so ever like name based
> access control.
>   

How is "all ports named 1-1024" different from
"all files named /etc/net*" ?

>   
>>>  Also I don't find
>>> this interface generically useful when you have to have intimate
>>> knowledge of the LSM to know what the correct xattrs to set are. You
>>> pointed it out yourself that Smack handles port labeling differently
>>> than SELinux
>>>       
>> Nope. Smack does not label ports. Ports are not policy components in
>> Smack. I pointed out that Smack treats sockets differently than SELinux.
>> I did so to address your issue with multiple xattrs on an object. I
>> pointed out that it is easy to do.
>>
>>     
>>>  so to try to shoe horn every LSM that labels ports into a
>>> filesystem interface where the user has to know LSM specific xattrs to
>>> set doesn't seem generic to me.
>>>   
>>>       
>> The xattr interface is generic. Yes, you have to know the name of
>> the attribute as well as the value it should have and yes that will
>> differ between LSMs.
>>
>>     
>>> Dave
>>>       
>> Now I'm glad the notion has been considered, and I can understand
>> if it seems like too much work or if you just don't see it as a good
>> idea.
>>
>> How about making it a part of the labeled networking code then?
>> That would seem to be a more focused approach that would also,
>> and perhaps better, address the generality concern.
>>     
>
> I'd consider talking to Paul Moore about it and getting his input then
> as I'm just a filesystem guy :)
>
>   

Paul responded in the negative, and I respect his judgement, even
on the occasion where we disagree.

Looks as if y'all are happier with a iptables-ish interface
than a filesystem-ish interface. Enjoy.


--
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.

  parent reply	other threads:[~2009-12-04  2:32 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30 21:27 [PATCH] Dynamic port labeling V2 Paul Nuzzi
2009-11-30 21:27 ` Paul Nuzzi
2009-12-01  4:52 ` Casey Schaufler
2009-12-01  4:52   ` Casey Schaufler
2009-12-01 15:06   ` David P. Quigley
2009-12-01 15:06     ` David P. Quigley
2009-12-01 15:29     ` Paul Nuzzi
2009-12-01 15:29       ` Paul Nuzzi
2009-12-02  2:38       ` Casey Schaufler
2009-12-02  2:38         ` Casey Schaufler
2009-12-01 17:50     ` Russell Coker
2009-12-01 19:14       ` Paul Nuzzi
2009-12-01 22:45         ` Daniel J Walsh
2009-12-01 23:07           ` David P. Quigley
2009-12-02  5:43             ` Casey Schaufler
2009-12-02 21:52               ` David P. Quigley
2009-12-03  3:37                 ` Casey Schaufler
2009-12-03 16:01                   ` David P. Quigley
2009-12-03 22:43                     ` Paul Moore
2009-12-04  2:32                     ` Casey Schaufler [this message]
2009-12-01 23:03       ` David P. Quigley
2009-12-03 19:31 ` Joshua Brindle
2009-12-03 19:31   ` Joshua Brindle
2009-12-04  0:12   ` Russell Coker
2009-12-04  0:12     ` Russell Coker
2009-12-04 14:30   ` Paul Nuzzi
2009-12-04 14:30     ` Paul Nuzzi
2009-12-04 16:03     ` Joshua Brindle
2009-12-04 16:03       ` Joshua Brindle
2009-12-07 17:21       ` Paul Nuzzi
2009-12-07 17:21         ` Paul Nuzzi
2009-12-18 15:38         ` Joshua Brindle
2009-12-18 15:38           ` Joshua Brindle
2009-12-18  5:33       ` Kyle Moffett
2009-12-18  5:33         ` Kyle Moffett
2009-12-18 18:46         ` Paul Moore
2009-12-18 18:46           ` Paul Moore

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=4B1874C9.1000508@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=dpquigl@tycho.nsa.gov \
    --cc=dwalsh@redhat.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=pjnuzzi@tycho.ncsc.mil \
    --cc=russell@coker.com.au \
    --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.