All of lore.kernel.org
 help / color / mirror / Atom feed
From: guido@trentalancia.net (Guido Trentalancia)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH v2] kernel: missing permissions for confined execution
Date: Wed, 28 Dec 2016 20:15:19 +0100	[thread overview]
Message-ID: <EAA874E3-F2D2-4BFC-9DB5-35CD743D39E6@trentalancia.net> (raw)
In-Reply-To: <1f499ba0-b107-ff5a-ea13-1c008bc9ceda@ieee.org>

Of course I know that I can simply remove the "unconfined" module locally.

The point is that unconfined_domain() is very dangerous, eventually as dangerous as "permissive".

I still cannot think of a valid reason for keeping those calls... 

Regards, 

Guido 

On the 28th of December 2016 19:38:29 CET, Chris PeBenito <pebenito@ieee.org> wrote:
>On 12/27/16 15:42, Guido Trentalancia via refpolicy wrote:
>> Hello.
>>
>>> On the 27th December 2016 at 21.32 cgzones <cgzones@googlemail.com>
>wrote:
>>>
>>>
>>> Maybe we can crib from dwalsh:
>>>
>https://www.redhat.com/archives/fedora-selinux-list/2009-September/msg00014.html
>>>
>>> During the development phase between releases implement the
>unconfined
>>> domains via a permissive statement, which causes audits, instead of
>>> using the almost almighty unconfined_domain_noaudit interface?
>>
>> Yes, this sounds a good idea to me. I didn't know about this option,
>thanks for
>> pointing it out.
>>
>> We could keep that for a month or two and see what feedback comes
>from git users
>> and developers.
>>
>> I just don't know the timeline for the next release...
>
>A few things:
>
>1. There is no goal to eliminate all unconfined domains.  Any domains 
>(with the exception of unconfined_t) should only be optionally 
>unconfined.  If you don't want unconfined domains, remove the
>unconfined 
>module.  The existing unconfined domains are there on purpose, not 
>because the policies are "incomplete".
>
>2. Permissive domains are not allowed upstream in refpolicy, at any
>time.
>
>3. I'm trying to get on a roughly quarterly release schedule, so the 
>next release is in approximately one month.
>
>
>
>>> 2016-12-27 21:22 GMT+01:00 Guido Trentalancia via refpolicy
>>> <refpolicy@oss.tresys.com>:
>>>> Hello Christopher.
>>>>
>>>> Thanks for merging this. We should now have a fully functional
>kernel module
>>>> that,
>>>> as such, should not need the unconfined_domain interface calls
>anymore.
>>>>
>>>> Unfortunately, version 2 of this patch did not actually removed
>such
>>>> interface
>>>> call.
>>>>
>>>> Now, we have two options:
>>>>
>>>> - remove it in a new simple patch today or tomorrow;
>>>> - wait to remove it until after the next release, so that we can
>benefit
>>>> from
>>>> some
>>>>   more development-stage testing, just in case some kernel
>installation
>>>> around
>>>>   needs some other permission which did not show up in the tests
>that I
>>>> carried
>>>> out.
>>>>
>>>> For sure, we shall strive to get rid of it, for maximum security.
>>>>
>>>>> On the 27th of December 2016 at 16.52 Chris PeBenito
><pebenito@ieee.org>
>>>>> wrote:
>>>>>
>>>>>
>>>>> On 12/18/16 15:58, Guido Trentalancia via refpolicy wrote:
>>>>>> This patch adds missing permissions in the kernel module that
>prevent
>>>>>> to run it without the unconfined module.
>>>>>>
>>>>>> This second version improves the comment section of new
>interfaces:
>>>>>> "Domain" is replaced by "Domain allowed access".
>>>>>
>>>>> I thought that all of the added rules were for the initramfs. 
>Since
>>>>> only a few are, I'm fine without the tunable, so I merged this
>version
>>>>> of the patch.
>>>>>
>>>>>
>>>>>
>>>>>> Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
>>>>>> ---
>>>>>>  policy/modules/kernel/devices.if    |   56 +++++++++++++++
>>>>>>  policy/modules/kernel/files.if      |  131
>>>>>> ++++++++++++++++++++++++++++++++++++
>>>>>>  policy/modules/kernel/filesystem.if |   18 ++++
>>>>>>  policy/modules/kernel/kernel.if     |   18 ++++
>>>>>>  policy/modules/kernel/kernel.te     |   34 +++++++++
>>>>>>  policy/modules/kernel/terminal.if   |   20 +++++
>>>>>>  6 files changed, 277 insertions(+)
>> _______________________________________________
>> refpolicy mailing list
>> refpolicy at oss.tresys.com
>> http://oss.tresys.com/mailman/listinfo/refpolicy
>>

  reply	other threads:[~2016-12-28 19:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-18  0:43 [refpolicy] [PATCH] kernel: missing permissions for confined execution Guido Trentalancia
2016-12-18 20:31 ` cgzones
2016-12-18 20:55   ` Guido Trentalancia
2016-12-18 20:58 ` [refpolicy] [PATCH v2] " Guido Trentalancia
2016-12-27 15:52   ` Chris PeBenito
2016-12-27 20:22     ` Guido Trentalancia
2016-12-27 20:32       ` cgzones
2016-12-27 20:42         ` Guido Trentalancia
2016-12-28 18:38           ` Chris PeBenito
2016-12-28 19:15             ` Guido Trentalancia [this message]
2016-12-18 22:30 ` [refpolicy] [PATCH] " Chris PeBenito
2016-12-19 14:50   ` Guido Trentalancia
2016-12-19 17:15     ` Guido Trentalancia
2016-12-21 19:25       ` Chris PeBenito
2016-12-21 19:32         ` Naftuli Kay
2016-12-21 20:27         ` Guido Trentalancia
2016-12-21 20:39           ` Guido Trentalancia
2016-12-21 20:49             ` Naftuli Kay
2016-12-22 20:57             ` Chris PeBenito
2016-12-22 21:05               ` [refpolicy] [PATCH v3] " Guido Trentalancia
2016-12-22 21:17                 ` Chris PeBenito
2016-12-22 21:30                   ` Guido Trentalancia
2016-12-23 23:08                   ` [refpolicy] [PATCH v4] " Guido Trentalancia

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=EAA874E3-F2D2-4BFC-9DB5-35CD743D39E6@trentalancia.net \
    --to=guido@trentalancia.net \
    --cc=refpolicy@oss.tresys.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.