<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/efi_loader/efi_image_loader.c, branch v2021.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/lib/efi_loader/efi_image_loader.c?h=v2021.10</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/lib/efi_loader/efi_image_loader.c?h=v2021.10'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2021-09-04T10:03:57Z</updated>
<entry>
<title>efi_loader: rounding of image size</title>
<updated>2021-09-04T10:03:57Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2021-08-29T09:52:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f3a343d7339acf1d531e438e15fef3c7975cfdcf'/>
<id>urn:sha1:f3a343d7339acf1d531e438e15fef3c7975cfdcf</id>
<content type='text'>
We should not first allocate memory and then report a rounded up value as
image size. Instead first round up according to section allocation and then
allocate the memory.

Fixes: 82786754b9d2 ("efi_loader: ImageSize must be multiple of SectionAlignment")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>efi_loader: sections with zero VirtualSize</title>
<updated>2021-09-04T10:03:57Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2021-08-29T09:52:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1ea133acd64eb0099865b0649b1d039ef63787ee'/>
<id>urn:sha1:1ea133acd64eb0099865b0649b1d039ef63787ee</id>
<content type='text'>
In a section header VirtualSize may be zero. This is for instance seen in
the .sbat section of shim. In this case use SizeOfRawData as section size.

Fixes: 9d30a941cce5 ("efi_loader: don't load beyond VirtualSize")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Asherah Connor &lt;ashe@kivikakk.ee&gt;
</content>
</entry>
<entry>
<title>efi_loader: fix Sphinx warning</title>
<updated>2021-06-09T10:35:01Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-06-08T22:21:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b95e5edc424a14c1d03848c03f92389a945d3e61'/>
<id>urn:sha1:b95e5edc424a14c1d03848c03f92389a945d3e61</id>
<content type='text'>
Brackets '[' need to be escaped to avoid a build warning

    lib/efi_loader/efi_image_loader.c:223:
    WARNING: Inline strong start-string without end-string.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
</content>
</entry>
<entry>
<title>efi_loader: add PE/COFF image measurement</title>
<updated>2021-05-28T14:17:01Z</updated>
<author>
<name>Masahisa Kojima</name>
<email>masahisa.kojima@linaro.org</email>
</author>
<published>2021-05-26T03:09:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=163a0d7e2cbdbdf26d90ac8d30c0495b814f3245'/>
<id>urn:sha1:163a0d7e2cbdbdf26d90ac8d30c0495b814f3245</id>
<content type='text'>
"TCG PC Client Platform Firmware Profile Specification"
requires to measure every attempt to load and execute
a OS Loader(a UEFI application) into PCR[4].
This commit adds the PE/COFF image measurement, extends PCR,
and appends measurement into Event Log.

Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Tested-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Signed-off-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
Replace CONFIG_HASH_CALCULATE by CONFIG_HASH
Fix conversions between pointers and u64.
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>efi_loader: expose efi_image_parse() even if UEFI Secure Boot is disabled</title>
<updated>2021-05-25T11:06:57Z</updated>
<author>
<name>Masahisa Kojima</name>
<email>masahisa.kojima@linaro.org</email>
</author>
<published>2021-05-14T00:53:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f6081a8a1e45e4864e36d83ccc236eef62478b1f'/>
<id>urn:sha1:f6081a8a1e45e4864e36d83ccc236eef62478b1f</id>
<content type='text'>
This is preparation for PE/COFF measurement support.
PE/COFF image hash calculation is same in both
UEFI Secure Boot image verification and measurement in
measured boot. PE/COFF image parsing functions are
gathered into efi_image_loader.c, and exposed even if
UEFI Secure Boot is not enabled.

This commit also adds the EFI_SIGNATURE_SUPPORT option
to decide if efi_signature.c shall be compiled.

Signed-off-by: Masahisa Kojima &lt;masahisa.kojima@linaro.org&gt;
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: don't load beyond VirtualSize</title>
<updated>2021-02-14T09:34:15Z</updated>
<author>
<name>Asherah Connor</name>
<email>ashe@kivikakk.ee</email>
</author>
<published>2021-02-09T06:19:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9d30a941cce5ed055da18398f4deba18830d00d6'/>
<id>urn:sha1:9d30a941cce5ed055da18398f4deba18830d00d6</id>
<content type='text'>
PE section table entries' SizeOfRawData must be a multiple of
FileAlignment, and thus may be rounded up and larger than their
VirtualSize.

We should not load beyond the VirtualSize, which is "the total size of
the section when loaded into memory" -- we may clobber real data at the
target in some other section, since we load sections in reverse order
and sections are usually laid out sequentially.

Signed-off-by: Asherah Connor &lt;ashe@kivikakk.ee&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: carve out efi_check_pe()</title>
<updated>2021-01-13T01:38:00Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-01-12T11:40:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5dad05a0e61d759af2df8cf900d044a8485bd747'/>
<id>urn:sha1:5dad05a0e61d759af2df8cf900d044a8485bd747</id>
<content type='text'>
Carve out a function to check that a buffer contains a PE-COFF image.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: error message if image not authenticated</title>
<updated>2020-09-06T19:21:41Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2020-08-27T15:51:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0f7878b853bdc363a930381c42b709b7d24066b5'/>
<id>urn:sha1:0f7878b853bdc363a930381c42b709b7d24066b5</id>
<content type='text'>
Currently if the bootefi command fails due to missing authentication, the
user gets no feedback.

Write a log message 'Image not authenticated' if LoadImage() fails due to
missing authentication.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: log function in image loader</title>
<updated>2020-09-06T19:21:41Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2020-08-25T17:51:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=24586059d3818d812300c77257c5134ddd7e2935'/>
<id>urn:sha1:24586059d3818d812300c77257c5134ddd7e2935</id>
<content type='text'>
Use log_err() for error messages.
Replace debug() by EFI_PRINT().

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>efi_loader: signature: correct a behavior against multiple signatures</title>
<updated>2020-08-14T10:28:25Z</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2020-08-14T05:39:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=52956e535e65c852b1f95d2ca5044cb7c4fc6bbe'/>
<id>urn:sha1:52956e535e65c852b1f95d2ca5044cb7c4fc6bbe</id>
<content type='text'>
Under the current implementation, all the signatures, if any, in
a signed image must be verified before loading it.

Meanwhile, UEFI specification v2.8b section 32.5.3.3 says,
    Multiple signatures are allowed to exist in the binary’s certificate
    table (as per PE/COFF Section “Attribute Certificate Table”). Only
    one hash or signature is required to be present in db in order to pass
    validation, so long as neither the SHA-256 hash of the binary nor any
    present signature is reflected in dbx.

This patch makes the semantics of signature verification compliant with
the specification mentioned above.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Reported-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
</feed>
