* mmap_file_perms needs ioctl also
@ 2007-03-08 15:27 Daniel J Walsh
2007-03-09 7:38 ` Russell Coker
0 siblings, 1 reply; 6+ messages in thread
From: Daniel J Walsh @ 2007-03-08 15:27 UTC (permalink / raw)
To: Christopher J. PeBenito, SE Linux
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: nsaserefpolicy_policy_support_obj_perm_sets.spt --]
[-- Type: text/plain, Size: 656 bytes --]
--- nsaserefpolicy/policy/support/obj_perm_sets.spt 2007-01-02 12:57:51.000000000 -0500
+++ serefpolicy-2.5.8/policy/support/obj_perm_sets.spt 2007-03-08 08:42:37.000000000 -0500
@@ -215,7 +215,7 @@
define(`getattr_file_perms',`{ getattr }')
define(`setattr_file_perms',`{ setattr }')
define(`read_file_perms',`{ getattr read lock ioctl }')
-define(`mmap_file_perms',`{ getattr read execute }')
+define(`mmap_file_perms',`{ getattr read execute ioctl }')
define(`exec_file_perms',`{ getattr read execute execute_no_trans }')
define(`append_file_perms',`{ getattr append lock ioctl }')
define(`write_file_perms',`{ getattr write append lock ioctl }')
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: mmap_file_perms needs ioctl also
2007-03-08 15:27 mmap_file_perms needs ioctl also Daniel J Walsh
@ 2007-03-09 7:38 ` Russell Coker
2007-03-09 12:51 ` Stephen Smalley
0 siblings, 1 reply; 6+ messages in thread
From: Russell Coker @ 2007-03-09 7:38 UTC (permalink / raw)
To: Daniel J Walsh; +Cc: SE-Linux
Why?
Many programs that mmap files will also make ioctl() calls on them. But AFAIK
there is nothing forcing the application programmer to do so. Expanding the
permissions in this regard seems unnecessary.
--
russell@coker.com.au
http://etbe.blogspot.com/ My Blog
http://www.coker.com.au/sponsorship.html Sponsoring Free Software development
--
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mmap_file_perms needs ioctl also
2007-03-09 7:38 ` Russell Coker
@ 2007-03-09 12:51 ` Stephen Smalley
2007-03-09 12:57 ` Daniel J Walsh
2007-03-09 17:06 ` Casey Schaufler
0 siblings, 2 replies; 6+ messages in thread
From: Stephen Smalley @ 2007-03-09 12:51 UTC (permalink / raw)
To: russell; +Cc: Daniel J Walsh, SE-Linux
On Fri, 2007-03-09 at 18:38 +1100, Russell Coker wrote:
> Why?
>
> Many programs that mmap files will also make ioctl() calls on them. But AFAIK
> there is nothing forcing the application programmer to do so. Expanding the
> permissions in this regard seems unnecessary.
ioctl permission is effectively useless as it doesn't distinguish
read-flow vs. write-flow vs. control-op, so it ends up being allowed
pervasively whenever you allow read or write. We really need to just
replace it (ala the attempts by Lorenzo in the past), but doing so
compatibly won't be easy.
--
Stephen Smalley
National Security Agency
--
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mmap_file_perms needs ioctl also
2007-03-09 12:51 ` Stephen Smalley
@ 2007-03-09 12:57 ` Daniel J Walsh
2007-03-09 17:06 ` Casey Schaufler
1 sibling, 0 replies; 6+ messages in thread
From: Daniel J Walsh @ 2007-03-09 12:57 UTC (permalink / raw)
To: Stephen Smalley; +Cc: russell, SE-Linux
Stephen Smalley wrote:
> On Fri, 2007-03-09 at 18:38 +1100, Russell Coker wrote:
>
>> Why?
>>
>> Many programs that mmap files will also make ioctl() calls on them. But AFAIK
>> there is nothing forcing the application programmer to do so. Expanding the
>> permissions in this regard seems unnecessary.
>>
>
> ioctl permission is effectively useless as it doesn't distinguish
> read-flow vs. write-flow vs. control-op, so it ends up being allowed
> pervasively whenever you allow read or write. We really need to just
> replace it (ala the attempts by Lorenzo in the past), but doing so
> compatibly won't be easy.
>
>
I just want the AVC go away...
--
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mmap_file_perms needs ioctl also
2007-03-09 12:51 ` Stephen Smalley
2007-03-09 12:57 ` Daniel J Walsh
@ 2007-03-09 17:06 ` Casey Schaufler
2007-03-09 17:14 ` Stephen Smalley
1 sibling, 1 reply; 6+ messages in thread
From: Casey Schaufler @ 2007-03-09 17:06 UTC (permalink / raw)
To: SE-Linux
--- Stephen Smalley <sds@tycho.nsa.gov> wrote:
> ioctl permission is effectively useless as it
> doesn't distinguish
> read-flow vs. write-flow vs. control-op, so it ends
> up being allowed
> pervasively whenever you allow read or write. We
> really need to just
> replace it (ala the attempts by Lorenzo in the
> past), but doing so
> compatibly won't be easy.
That is a significant understatement. Ioctl is
used, misused, and abused so many different ways
in so many places that doing a granular enforcement
may be beyond the current state of the art and is
certainly a maintenance burden that exceeds the
scope of the existing SELinux implementation.
An investigation into the networking drivers alone
ought to send the rational programmer running in
blind terror. Then there are the graphics
implementations.
I suggest that an approach that would add more
value to the kernel overall and make someone a
minor kernel diety would be to replace the ioctl
mechanism completely. I also think that it would
be less work than trying to do a proper job of
granualizing the existing smoldering pile of
technology.
We did look into the granular ioctl security
policy issue in Unix in the 20th centuty. If
you restrict your system to a very limited set
of devices it still stretches an evaluation
budget beyond the breaking point. It's very
hard to justify the value of the granularity
in terms of the cost.
Casey Schaufler
casey@schaufler-ca.com
--
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mmap_file_perms needs ioctl also
2007-03-09 17:06 ` Casey Schaufler
@ 2007-03-09 17:14 ` Stephen Smalley
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Smalley @ 2007-03-09 17:14 UTC (permalink / raw)
To: casey; +Cc: SE-Linux
On Fri, 2007-03-09 at 09:06 -0800, Casey Schaufler wrote:
> --- Stephen Smalley <sds@tycho.nsa.gov> wrote:
>
>
> > ioctl permission is effectively useless as it
> > doesn't distinguish
> > read-flow vs. write-flow vs. control-op, so it ends
> > up being allowed
> > pervasively whenever you allow read or write. We
> > really need to just
> > replace it (ala the attempts by Lorenzo in the
> > past), but doing so
> > compatibly won't be easy.
>
> That is a significant understatement. Ioctl is
> used, misused, and abused so many different ways
> in so many places that doing a granular enforcement
> may be beyond the current state of the art and is
> certainly a maintenance burden that exceeds the
> scope of the existing SELinux implementation.
> An investigation into the networking drivers alone
> ought to send the rational programmer running in
> blind terror. Then there are the graphics
> implementations.
>
> I suggest that an approach that would add more
> value to the kernel overall and make someone a
> minor kernel diety would be to replace the ioctl
> mechanism completely. I also think that it would
> be less work than trying to do a proper job of
> granualizing the existing smoldering pile of
> technology.
The trend seems to be to replace such things with pseudo filesystem
interfaces, but in doing so, they usually aren't thinking through the
security aspects (e.g. see the CKRM discussion and my comments on the
kernel cpuset filesystem), so the file-level controls are often
inadequate and we are back to adding hooks into the underlying
implementation...
> We did look into the granular ioctl security
> policy issue in Unix in the 20th centuty. If
> you restrict your system to a very limited set
> of devices it still stretches an evaluation
> budget beyond the breaking point. It's very
> hard to justify the value of the granularity
> in terms of the cost.
--
Stephen Smalley
National Security Agency
--
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-03-09 17:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-08 15:27 mmap_file_perms needs ioctl also Daniel J Walsh
2007-03-09 7:38 ` Russell Coker
2007-03-09 12:51 ` Stephen Smalley
2007-03-09 12:57 ` Daniel J Walsh
2007-03-09 17:06 ` Casey Schaufler
2007-03-09 17:14 ` Stephen Smalley
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.