lkml.org 
[lkml]   [2017]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown
From
Date
> > IMHO that should just fail then, ie, a "locked down" kernel should not want to
> > *pass* a firmware signature if such thing could not be done.
> >
> > Its no different than trying to verify a signed module on a "locked down" for
> > which it has no signature.
> >
> > But perhaps I'm not understanding the issue well, let me know.
>
> My point is quite simple:
> my_deviceA_init() {
> err = request_firmware(&fw, "deviceA"); <--- (a)
> if (err)
> goto err_request;
>
> err = verify_firmware(fw); <--- (b)
> if (err)
> goto err_verify;
>
> load_fw_to_deviceA(fw); <--- (c)
> ...
> }
>
> As legacy device drivers does not have (b), there is no chance to
> prevent loading a firmware at (c) for locked-down kernel.
>
> If you allow me to bring in yet another function, say
> request_firmware_signable(), which should be used in place of (a)
> for all verification-aware drivers, that would be fine.

I really don't understand why you need a new function.  The
request_firmware() eventually calls kernel_read_file_from_path(),
which already calls the pre and post LSM hooks.

IMA-appraisal is already on these hooks verifying the requested
firmware's signature.  For systems with "lockdown" enabled, but
without IMA-appraisal enabled, define a small, builtin LSM that sits
on these LSM hooks and denies the unsigned firmware requests.

Mimi

> In this case, all the invocation of request_firmware() in legacy code
> could be forced to fail in locked-down kernel.
>
> But I think that "signable" should be allowed to be combined with other
> features of request_firmware variants like _(no)wait or _direct.
>
> -Takahiro AKASHI

\
 
 \ /
  Last update: 2017-11-09 03:18    [W:0.267 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site