<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libsecureboot/vets.c, branch releng/12.2</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>veloader use vectx API for kernel and modules</title>
<updated>2020-04-09T04:50:19+00:00</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2020-04-09T04:50:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=19815ded6503c7e91e54f20f67ba16f72f74fe52'/>
<id>19815ded6503c7e91e54f20f67ba16f72f74fe52</id>
<content type='text'>
The vectx API, computes the hash for verifying a file as it is read.
This avoids the overhead of reading files twice - once to verify, then
again to load.

For doing an install via loader, avoiding the need to rewind
large files is critical.

This API is only used for modules, kernel and mdimage as these are the
biggest files read by the loader.
The reduction in boot time depends on how expensive the I/O is
on any given platform.  On a fast VM we see 6% improvement.

For install via loader the first file to be verified is likely to be the
kernel, so some of the prep work (finding manifest etc) done by
verify_file() needs to be factored so it can be reused for
vectx_open().

For missing or unrecognized fingerprint entries, we fail
in vectx_open() unless verifying is disabled.

Otherwise fingerprint check happens in vectx_close() and
since this API is only used for files which must be verified
(VE_MUST) we panic if we get an incorrect hash.

Fix pkgfs stat so it satisfies libsecureboot

We need a valid st_dev, st_ino and st_mtime
to correctly track which files have been verified
and to update our notion of time.

ve_utc_set(): ignore utc if it would jump our current time
by more than VE_UTC_MAX_JUMP (20 years).

Allow testing of install command via userboot.
Need to fix its stat implementation too.

bhyveload also needs stat fixed - due to change to userboot.h

Call ve_error_get() from vectx_close() when hash is wrong.

Track the names of files we have hashed into pcr

For the purposes of measured boot, it is important
to be able to reproduce the hash reflected in
loader.ve.pcr
so loader.ve.hashed provides a list of names in the order they
were added.

Avoid unused vars when VE_ECDSA_HASH_AGAIN undefined

MFC of r358744 r358767 r359307 r355962

Reviewed by:	imp,tsoome,emaste
Sponsored by:	Juniper Networks
Differential Revision:	https://reviews.freebsd.org//D23827 https://reviews.freebsd.org//D24027
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vectx API, computes the hash for verifying a file as it is read.
This avoids the overhead of reading files twice - once to verify, then
again to load.

For doing an install via loader, avoiding the need to rewind
large files is critical.

This API is only used for modules, kernel and mdimage as these are the
biggest files read by the loader.
The reduction in boot time depends on how expensive the I/O is
on any given platform.  On a fast VM we see 6% improvement.

For install via loader the first file to be verified is likely to be the
kernel, so some of the prep work (finding manifest etc) done by
verify_file() needs to be factored so it can be reused for
vectx_open().

For missing or unrecognized fingerprint entries, we fail
in vectx_open() unless verifying is disabled.

Otherwise fingerprint check happens in vectx_close() and
since this API is only used for files which must be verified
(VE_MUST) we panic if we get an incorrect hash.

Fix pkgfs stat so it satisfies libsecureboot

We need a valid st_dev, st_ino and st_mtime
to correctly track which files have been verified
and to update our notion of time.

ve_utc_set(): ignore utc if it would jump our current time
by more than VE_UTC_MAX_JUMP (20 years).

Allow testing of install command via userboot.
Need to fix its stat implementation too.

bhyveload also needs stat fixed - due to change to userboot.h

Call ve_error_get() from vectx_close() when hash is wrong.

Track the names of files we have hashed into pcr

For the purposes of measured boot, it is important
to be able to reproduce the hash reflected in
loader.ve.pcr
so loader.ve.hashed provides a list of names in the order they
were added.

Avoid unused vars when VE_ECDSA_HASH_AGAIN undefined

MFC of r358744 r358767 r359307 r355962

Reviewed by:	imp,tsoome,emaste
Sponsored by:	Juniper Networks
Differential Revision:	https://reviews.freebsd.org//D23827 https://reviews.freebsd.org//D24027
</pre>
</div>
</content>
</entry>
<entry>
<title>Initialize verbosity and debug level from env</title>
<updated>2019-10-31T20:29:45+00:00</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2019-10-31T20:29:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9ee0c04f95c73a958add6184ce350d5ff48c239b'/>
<id>9ee0c04f95c73a958add6184ce350d5ff48c239b</id>
<content type='text'>
For EFI at least, we can seed the environment
with VE_VERBOSE etc.

MFC of r354038

Reviewed by:	stevek imp
Sponsored by:	Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22135
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For EFI at least, we can seed the environment
with VE_VERBOSE etc.

MFC of r354038

Reviewed by:	stevek imp
Sponsored by:	Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22135
</pre>
</div>
</content>
</entry>
<entry>
<title>libsecureboot: allow OpenPGP support to be dormant</title>
<updated>2019-07-10T21:35:55+00:00</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2019-07-10T21:35:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c6eb46769d0ba33bcc1096f036ebc165eb585c92'/>
<id>c6eb46769d0ba33bcc1096f036ebc165eb585c92</id>
<content type='text'>
Since we can now add OpenPGP trust anchors at runtime,
ensure the latent support is available.

Ensure we do not add duplicate keys to trust store.

Also allow reporting names of trust anchors added/revoked

We only do this for loader and only after initializing trust store.
Thus only changes to initial trust store will be logged.

MFC of r349446

Reviewed by:    stevek
Differential Revision:  https://reviews.freebsd.org/D20700
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we can now add OpenPGP trust anchors at runtime,
ensure the latent support is available.

Ensure we do not add duplicate keys to trust store.

Also allow reporting names of trust anchors added/revoked

We only do this for loader and only after initializing trust store.
Thus only changes to initial trust store will be logged.

MFC of r349446

Reviewed by:    stevek
Differential Revision:  https://reviews.freebsd.org/D20700
</pre>
</div>
</content>
</entry>
<entry>
<title>libsecureboot: make it easier to customize trust anchors</title>
<updated>2019-05-16T16:15:41+00:00</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2019-05-16T16:15:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e9134c4661ea9e0ffbeaa1acfe121b8a5a5a1559'/>
<id>e9134c4661ea9e0ffbeaa1acfe121b8a5a5a1559</id>
<content type='text'>
Avoid making hash self-tests depend on X.509 certs.
Include OpenPGP keys in trust store count.

MFC of r347408

Reviewed by:	stevek
Sponsored by:	Juniper Networks
Differential Revision:	https://reviews.freebsd.org/D20208
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid making hash self-tests depend on X.509 certs.
Include OpenPGP keys in trust store count.

MFC of r347408

Reviewed by:	stevek
Sponsored by:	Juniper Networks
Differential Revision:	https://reviews.freebsd.org/D20208
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r344840: Extend libsecureboot(old libve) to obtain trusted certificates from UEFI and implement revocation</title>
<updated>2019-04-26T00:48:52+00:00</updated>
<author>
<name>Marcin Wojtas</name>
<email>mw@FreeBSD.org</email>
</author>
<published>2019-04-26T00:48:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=63fd89c7cdb04dada3f82eb75201782b8712c8b6'/>
<id>63fd89c7cdb04dada3f82eb75201782b8712c8b6</id>
<content type='text'>
UEFI related headers were copied from edk2.

A new build option "MK_LOADER_EFI_SECUREBOOT" was added to allow
loading of trusted anchors from UEFI.

Certificate revocation support is also introduced.
The forbidden certificates are loaded from dbx variable.
Verification fails in two cases:

There is a direct match between cert in dbx and the one in the chain.
The CA used to sign the chain is found in dbx.
One can also insert a hash of TBS section of a certificate into dbx.
In this case verifications fails only if a direct match with a
certificate in chain is found.

Submitted by: Kornel Duleba &lt;mindal@semihalf.com&gt;
Obtained from: Semihalf
Sponsored by: Stormshield
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UEFI related headers were copied from edk2.

A new build option "MK_LOADER_EFI_SECUREBOOT" was added to allow
loading of trusted anchors from UEFI.

Certificate revocation support is also introduced.
The forbidden certificates are loaded from dbx variable.
Verification fails in two cases:

There is a direct match between cert in dbx and the one in the chain.
The CA used to sign the chain is found in dbx.
One can also insert a hash of TBS section of a certificate into dbx.
In this case verifications fails only if a direct match with a
certificate in chain is found.

Submitted by: Kornel Duleba &lt;mindal@semihalf.com&gt;
Obtained from: Semihalf
Sponsored by: Stormshield
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for loader veriexec</title>
<updated>2019-04-12T01:03:00+00:00</updated>
<author>
<name>Simon J. Gerraty</name>
<email>sjg@FreeBSD.org</email>
</author>
<published>2019-04-12T01:03:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ae8c08e7ce273c86febc4fd9d6357232b277548a'/>
<id>ae8c08e7ce273c86febc4fd9d6357232b277548a</id>
<content type='text'>
Also sbin/veriexec for mac_veriexec

MFC r343281,344564-344568,344780,344784,345289,346070
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also sbin/veriexec for mac_veriexec

MFC r343281,344564-344568,344780,344784,345289,346070
</pre>
</div>
</content>
</entry>
</feed>
