linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Paul Moore <paul@paul-moore.com>
Cc: "David Howells" <dhowells@redhat.com>,
	"Mimi Zohar" <zohar@linux.vnet.ibm.com>,
	"Andy Lutomirski" <luto@amacapital.net>,
	"Kees Cook" <keescook@chromium.org>,
	"Roberts, William C" <william.c.roberts@intel.com>,
	"linux-security-module@vger.kernel.org"
	<linux-security-module@vger.kernel.org>,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	"james.l.morris@oracle.com" <james.l.morris@oracle.com>,
	"serge@hallyn.com" <serge@hallyn.com>,
	"Vitaly Kuznetsov" <vkuznets@redhat.com>,
	"Eric Paris" <eparis@parisplace.org>,
	selinux@tycho.nsa.gov, "Stephen Smalley" <sds@tycho.nsa.gov>,
	"Schaufler, Casey" <casey.schaufler@intel.com>,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	"Dmitry Kasatkin" <dmitry.kasatkin@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Peter Jones" <pjones@redhat.com>, "Takashi Iwai" <tiwai@suse.de>,
	dwmw2@infradead.org, "Ming Lei" <ming.lei@canonical.com>,
	"Joey Lee" <jlee@suse.de>, "Vojtěch Pavlík" <vojtech@suse.com>,
	"Gary Ching-Pang Lin" <glin@suse.com>,
	"Kyle McMartin" <kyle@kernel.org>,
	"Seth Forshee" <seth.forshee@canonical.com>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>,
	"Johannes Berg" <johannes@sipsolutions.net>
Subject: Re: Linux Firmware Signing
Date: Thu, 27 Aug 2015 21:36:05 +0200	[thread overview]
Message-ID: <20150827193605.GD8051@wotan.suse.de> (raw)
In-Reply-To: <CAHC9VhR9z2WVp+Q1hBkr5jduAH-J1DW12-k7U1eaQGgrP4c1Yw@mail.gmail.com>

On Wed, Aug 26, 2015 at 10:35:19PM -0400, Paul Moore wrote:
> On Wed, Aug 26, 2015 at 7:26 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> > On Wed, Aug 26, 2015 at 03:33:04PM +0100, David Howells wrote:
> > Now let's review the SELinux stuff before we jump back into firmware / system
> > data stuff again as there is a joint criteria to consider for all of these.
> > For other people's refrence the enum you quote above was added through your
> > patch pending on linux-next:
> >
> > "PKCS#7: Appropriately restrict authenticated attributes and content type"
> >
> > Based on what Roberts seems to want to do for SELinux policy files it would
> > seems we may also need VERIFYING_SELINUX_POLICY. SELinux policy loading is
> > unique in the at it uses its own fs and uses a load trigger node (sel_load_ops)
> > to kick off  security_load_policy(data, count), so its not exactly a
> > yet-another-API to read arbitrary files from the file system. Its policy files
> > are also very distribution specific. Because of all this its not really
> > suitable for /lib/firmware/ or sharing code even futher. It seems its a prime
> > candidate already to make use of the system_verify_data() APIs you added David,
> > provided the items below are taken care of as well.
> 
> One thing to keep in mind is that not only are SELinux policy files
> distribution specific, they are machine specific as administrators
> can, and do, customize the policy for their usage.  I really like the
> idea of providing signed SELinux policies to the kernel but I question
> how practical it will be for normal users/admins.

Yeah that makes it harder. Possible but harder.

> Some of the Machine Owner Key (MOK) work would likely be necessary for
> signed SELinux policies to be even remotely practical.

Matthew, Peter and Gary are Cc'd, so they can feel free to chime in.

There are other alternatives as well:

 * Is there wide use of SELinux + IMA ? If so that may be another option.

 * The kernel cert stuff can also allow for installing keys *later* which
   could be trusted specifically for SELinux Policy files, but that'd
   mean having to generate / sign these someway up in the food chain.

These are all worth considering not just for SELinux but any other form of
machine-specific data from files which might need to be fed to the kernel.

Are there other use cases other than SELinux policy files?

Anyway, its good we're reviewing this early before patches for SELinux
policy file stuff for signing are brewed. The APIs will be there, but need
to be advanced slightly for firmware signing anyway so there is time for
you folks to think about what route you want to go. If you *do* determine
you need it, it seems pretty easy to handle.

> Assuming I'm understanding the firmwareName attribute idea correctly,
> we don't need to worry about that from a SELinux policy point of view.
> As others have already stated, the kernel just reads a binary blob
> that is pushed into it by userspace using securityfs.

Ah thanks, great, one less thing to think about. So it would just be
the enum and OID that would be needed, should you guys go down the
kernel signing route.

  Luis

  reply	other threads:[~2015-08-27 19:36 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150824210234.GI8051@wotan.suse.de>
     [not found] ` <476DC76E7D1DF2438D32BFADF679FC5601057D32@ORSMSX103.amr.corp.intel.com>
     [not found]   ` <20150824225713.GJ8051@wotan.suse.de>
     [not found]     ` <CAGXu5jLDHCgygaVNHpuvszN6SXNKAjRW83q3-D2ZfRpO4uAmdw@mail.gmail.com>
     [not found]       ` <476DC76E7D1DF2438D32BFADF679FC5601058E78@ORSMSX103.amr.corp.intel.com>
     [not found]         ` <CAGXu5jJuwPfnQhu9u4-90UkmjWTBF_GLpJ7J1VaaT2D0d_-Mhg@mail.gmail.com>
     [not found]           ` <1440462367.2737.4.camel@linux.vnet.ibm.com>
     [not found]             ` <CALCETrXWBBdOKz-fSdM7YVu_sWQbA3YsHPeZAkRmtj+eawqZGQ@mail.gmail.com>
     [not found]               ` <1440464705.2737.36.camel@linux.vnet.ibm.com>
     [not found]                 ` <14540.1440599584@warthog.procyon.org.uk>
2015-08-26 23:26                   ` Linux Firmware Signing Luis R. Rodriguez
2015-08-27  2:35                     ` Paul Moore
2015-08-27 19:36                       ` Luis R. Rodriguez [this message]
2015-08-27 23:46                         ` Paul Moore
2015-08-27 10:38                   ` David Howells
2015-08-27 10:57                     ` David Woodhouse
2015-08-27 21:29                       ` Luis R. Rodriguez
2015-08-27 23:54                         ` Mimi Zohar
2015-08-29  2:16                           ` Luis R. Rodriguez
2015-08-31 14:18                             ` Mimi Zohar
2015-08-31 16:05                               ` David Woodhouse
2015-08-31 16:45                                 ` Mimi Zohar
2015-09-02  0:00                                   ` Luis R. Rodriguez
2015-09-01 23:43                               ` Luis R. Rodriguez
2015-09-02  3:08                                 ` Kees Cook
2015-09-02  3:44                                   ` Mimi Zohar
2015-09-02 15:28                                     ` Kees Cook
2015-09-02 16:45                                       ` Mimi Zohar
2015-09-02 17:36                                         ` Austin S Hemmelgarn
2015-09-02 23:54                                 ` Mimi Zohar
2015-09-03  0:18                                   ` Luis R. Rodriguez
2015-08-27 23:56                         ` Paul Moore
2015-08-28 11:20                           ` Roberts, William C
2015-08-28 22:26                             ` Paul Moore
2015-08-29  2:03                               ` Luis R. Rodriguez
2015-09-01  2:52                                 ` Paul Moore
2015-09-01 14:12                                   ` Joshua Brindle
2015-09-01 20:08                                     ` Roberts, William C
2015-09-01 20:46                                       ` Joshua Brindle
2015-09-01 22:21                                   ` Eric Paris
2015-08-29  1:56                             ` Luis R. Rodriguez
2015-09-01 20:20                         ` Kees Cook
2015-09-02  0:09                           ` Luis R. Rodriguez
2015-09-02  3:35                             ` Mimi Zohar
2015-09-02 18:46                               ` Luis R. Rodriguez
2015-09-02 20:54                                 ` Kees Cook
2015-09-02 21:37                                   ` Luis R. Rodriguez
2015-09-03 21:14                                     ` Kees Cook
2015-09-30 20:34                                       ` Luis R. Rodriguez
2015-09-03  0:05                                 ` Mimi Zohar
2015-09-03  0:29                                   ` Luis R. Rodriguez
2015-09-03  3:00                                     ` Mimi Zohar
2015-08-27 19:37                     ` Luis R. Rodriguez

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=20150827193605.GD8051@wotan.suse.de \
    --to=mcgrof@suse.com \
    --cc=casey.schaufler@intel.com \
    --cc=dhowells@redhat.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=eparis@parisplace.org \
    --cc=glin@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.l.morris@oracle.com \
    --cc=jlee@suse.de \
    --cc=johannes@sipsolutions.net \
    --cc=keescook@chromium.org \
    --cc=kyle@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mcgrof@do-not-panic.com \
    --cc=ming.lei@canonical.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=paul@paul-moore.com \
    --cc=pjones@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=serge@hallyn.com \
    --cc=seth.forshee@canonical.com \
    --cc=tiwai@suse.de \
    --cc=vkuznets@redhat.com \
    --cc=vojtech@suse.com \
    --cc=william.c.roberts@intel.com \
    --cc=zohar@linux.vnet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).