kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
* [kernel-hardening] Initialising random(4)
@ 2016-06-16 17:06 Sandy Harris
  2016-06-16 17:10 ` Kees Cook
  0 siblings, 1 reply; 5+ messages in thread
From: Sandy Harris @ 2016-06-16 17:06 UTC (permalink / raw)
  To: kernel-hardening

The gresecurity patches include code to initiailse the driver's pools
with random data. I have different code to accomplish the same task &
think anyone planning to integrate that part of the gre stuff into the
kernel should also have a look at mine:
https://github.com/sandy-harris/random.gcm/blob/random_gcm/scripts/gen_random.c

I submitted an earlier version as a kernel patch, part of a large &
complex series of proposed patches.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kernel-hardening] Initialising random(4)
  2016-06-16 17:06 [kernel-hardening] Initialising random(4) Sandy Harris
@ 2016-06-16 17:10 ` Kees Cook
  2016-06-16 17:31   ` Sandy Harris
  0 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2016-06-16 17:10 UTC (permalink / raw)
  To: kernel-hardening

On Thu, Jun 16, 2016 at 10:06 AM, Sandy Harris <sandyinchina@gmail.com> wrote:
> The gresecurity patches include code to initiailse the driver's pools
> with random data. I have different code to accomplish the same task &
> think anyone planning to integrate that part of the gre stuff into the
> kernel should also have a look at mine:
> https://github.com/sandy-harris/random.gcm/blob/random_gcm/scripts/gen_random.c
>
> I submitted an earlier version as a kernel patch, part of a large &
> complex series of proposed patches.

Do you have a URL to the kernel patch you sent? Right now, the
latent_entropy plugin does some static initialization with build-time
randomness, and then augments the pool with additional entropy during
boot. How does yours differ?

-Kees

-- 
Kees Cook
Chrome OS & Brillo Security

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kernel-hardening] Initialising random(4)
  2016-06-16 17:10 ` Kees Cook
@ 2016-06-16 17:31   ` Sandy Harris
  2016-06-16 17:46     ` Kees Cook
  0 siblings, 1 reply; 5+ messages in thread
From: Sandy Harris @ 2016-06-16 17:31 UTC (permalink / raw)
  To: kernel-hardening

On Thu, Jun 16, 2016 at 1:10 PM, Kees Cook <keescook@chromium.org> wrote:
> On Thu, Jun 16, 2016 at 10:06 AM, Sandy Harris <sandyinchina@gmail.com> wrote:

>> The gresecurity patches include code to initiailse the driver's pools
>> with random data. I have different code to accomplish the same task &
>> think anyone planning to integrate that part of the gre stuff into the
>> kernel should also have a look at mine:
>> https://github.com/sandy-harris/random.gcm/blob/random_gcm/scripts/gen_random.c
>>
>> I submitted an earlier version as a kernel patch, part of a large &
>> complex series of proposed patches.
>
> Do you have a URL to the kernel patch you sent?

Create the program to initialise things:
https://lkml.org/lkml/2015/11/7/137

Changes to the driver to use it:
https://lkml.org/lkml/2015/11/7/133

> Right now, the
> latent_entropy plugin does some static initialization with build-time
> randomness, and then augments the pool with additional entropy during
> boot. How does yours differ?

Mine initialises all pools at compile time, using data from
/dev/urandom on the development machine

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kernel-hardening] Initialising random(4)
  2016-06-16 17:31   ` Sandy Harris
@ 2016-06-16 17:46     ` Kees Cook
  2016-06-17  3:42       ` Sandy Harris
  0 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2016-06-16 17:46 UTC (permalink / raw)
  To: kernel-hardening

On Thu, Jun 16, 2016 at 10:31 AM, Sandy Harris <sandyinchina@gmail.com> wrote:
> On Thu, Jun 16, 2016 at 1:10 PM, Kees Cook <keescook@chromium.org> wrote:
>> On Thu, Jun 16, 2016 at 10:06 AM, Sandy Harris <sandyinchina@gmail.com> wrote:
>
>>> The gresecurity patches include code to initiailse the driver's pools
>>> with random data. I have different code to accomplish the same task &
>>> think anyone planning to integrate that part of the gre stuff into the
>>> kernel should also have a look at mine:
>>> https://github.com/sandy-harris/random.gcm/blob/random_gcm/scripts/gen_random.c
>>>
>>> I submitted an earlier version as a kernel patch, part of a large &
>>> complex series of proposed patches.
>>
>> Do you have a URL to the kernel patch you sent?
>
> Create the program to initialise things:
> https://lkml.org/lkml/2015/11/7/137
>
> Changes to the driver to use it:
> https://lkml.org/lkml/2015/11/7/133

Okay, thanks for the pointers. Yeah, this looks similar to what
latent_entropy does.

>> Right now, the
>> latent_entropy plugin does some static initialization with build-time
>> randomness, and then augments the pool with additional entropy during
>> boot. How does yours differ?
>
> Mine initialises all pools at compile time, using data from
> /dev/urandom on the development machine

Cool. Based on my quick examination, I think the latent_entropy way of
doing this is no less secure but is much easier to implement (it's
just an attribute addition in the code). It looks like your version
ends up with a lot of #ifdefs, etc, and targets a single collection of
arrays.

I'm open to ways these two methods could work together, of course!

Thanks!

-Kees

-- 
Kees Cook
Chrome OS & Brillo Security

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kernel-hardening] Initialising random(4)
  2016-06-16 17:46     ` Kees Cook
@ 2016-06-17  3:42       ` Sandy Harris
  0 siblings, 0 replies; 5+ messages in thread
From: Sandy Harris @ 2016-06-17  3:42 UTC (permalink / raw)
  To: kernel-hardening

Kees Cook <keescook@chromium.org> wrote:

>>> Right now, the
>>> latent_entropy plugin does some static initialization with build-time
>>> randomness, and then augments the pool with additional entropy during
>>> boot. How does yours differ?
>>
>> Mine initialises all pools at compile time, using data from
>> /dev/urandom on the development machine
>
> Cool. Based on my quick examination, I think the latent_entropy way of
> doing this is no less secure but is much easier to implement (it's
> just an attribute addition in the code). It looks like your version
> ends up with a lot of #ifdefs, etc, and targets a single collection of
> arrays.

The #ifdefs are just because this was an RFC test version so
I used a CONFIG variable to control whether my initialisation
was done. Turn it off & the pool arrays just get declared.

If the patch were accepted, no #ifdefs would be needed.

> I'm open to ways these two methods could work together, of course!

I have not looked closely at the latent-entropy plug in. One
option would be to use my stuff at build time and the
other at boot time.

There were other parts of my patch series intended to
help at boot time, but unlike the initialisation stuff they
were somewhat complex and part of an all-or-nothing
proposed rewrite of a large chunk of the driver. Also,
unlike the init stuff they would not apply to the current
driver because Ted has changed some things since
I did those patches.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-17  3:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-16 17:06 [kernel-hardening] Initialising random(4) Sandy Harris
2016-06-16 17:10 ` Kees Cook
2016-06-16 17:31   ` Sandy Harris
2016-06-16 17:46     ` Kees Cook
2016-06-17  3:42       ` Sandy Harris

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