<feed xmlns='http://www.w3.org/2005/Atom'>
<title>efi-boot-shim.git/test-sbat.c, branch rolling</title>
<subtitle> (mirror of https://github.com/vyos/efi-boot-shim.git)
</subtitle>
<id>https://git.amelek.net/vyos/efi-boot-shim.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/efi-boot-shim.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/'/>
<updated>2025-02-05T14:10:35+00:00</updated>
<entry>
<title>Generate and use generated_sbat_var_defs.h</title>
<updated>2025-02-05T14:10:35+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2025-02-04T01:15:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=5ae408aede0a410f28de92a5fdc5ce406f2c4515'/>
<id>urn:sha1:5ae408aede0a410f28de92a5fdc5ce406f2c4515</id>
<content type='text'>
Build changes to generate include/generated_sbat_var_defs.h from
SbatLevel_Variable.txt and use that header file. From here on
forward SbatLevel_Variable.txt should be the only place a new
revocation needs to be recorded.

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>Rename "previous" revocations to "automatic"</title>
<updated>2024-01-22T19:17:20+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2023-12-14T01:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=30a4f3751a8da09ab0853f1a384b80096828cc34'/>
<id>urn:sha1:30a4f3751a8da09ab0853f1a384b80096828cc34</id>
<content type='text'>
When the term previous was introduced for revocations to be
automatically applied there was a hope that everytime a new
revocation was built into shim, the previous revocation could
be applied automatically. Further experience has shown the
real world to be more complex than that. The automatic payload
will realistically contain a set of revocations governed by
both the cadence at which a distro's customer base updates
as well as the severity of the issue being revoked.

This is not a functional change.

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>shim should not self revoke</title>
<updated>2023-12-05T18:20:00+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2023-07-07T20:21:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=a967c0e7a0a27a310958f5b64a4c4ef8dc1b546e'/>
<id>urn:sha1:a967c0e7a0a27a310958f5b64a4c4ef8dc1b546e</id>
<content type='text'>
Before applying an updated SbatLevel shim should re-run
introspection and never apply a revocation level that would
prevent the currently running shim from booting. The proper
way forward is to update shim first.

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>Allow SbatLevel data from external binary</title>
<updated>2023-12-05T18:20:00+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2022-11-10T03:37:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=ea0f9dfe8ae49ead3204be4c3166b08cc96fad7e'/>
<id>urn:sha1:ea0f9dfe8ae49ead3204be4c3166b08cc96fad7e</id>
<content type='text'>
Ingest SBAT Levels from revocations binary thereby allowing level
requirements to be updated independently from shipping a new shim.
Do not automatically apply any revocations from a stock shim at
this point.

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>Fix a 1-byte memory leak in .sbat parsing.</title>
<updated>2023-06-29T18:35:50+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2023-06-28T20:47:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=a0673e36db13e660f809de3e60900cb9381f8589'/>
<id>urn:sha1:a0673e36db13e660f809de3e60900cb9381f8589</id>
<content type='text'>
On the occasion that .sbat is entirely made of characters that aren't
meaningfully CSV /data/, but which the parser accepts (i.e. newline), we
currently allocate a byte of memory which then gets leaked.

This patch tests for that condition and skips the allocation when there
aren't any actual /entries/ to parse.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>test-sbat: Fix exit code</title>
<updated>2023-05-02T18:08:57+00:00</updated>
<author>
<name>Nicholas Bishop</name>
<email>nicholasbishop@google.com</email>
</author>
<published>2022-12-20T19:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=aae3df086a22aa1727889199f730b9d5dc9de78c'/>
<id>urn:sha1:aae3df086a22aa1727889199f730b9d5dc9de78c</id>
<content type='text'>
Fix the `main` function in `test-sbat.c` to return the `status` variable
like the other `test-*.c` files.

Signed-off-by: Nicholas Bishop &lt;nicholasbishop@google.com&gt;
</content>
</entry>
<entry>
<title>Make sbat_var.S parse right with buggy gcc/binutils</title>
<updated>2022-12-07T15:45:23+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2022-12-05T22:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=657b2483ca6e9fcf2ad8ac7ee577ff546d24c3aa'/>
<id>urn:sha1:657b2483ca6e9fcf2ad8ac7ee577ff546d24c3aa</id>
<content type='text'>
In https://github.com/rhboot/shim/issues/533 , iokomin noticed that
gas in binutils before 2.36 appears to be incorrectly concatenating
string literals in '.asciz' directives, including an extra NUL character
in between the strings, and this will cause us to incorrectly parse the
.sbatlevel section in shim binaries.

This patch adds test cases that will cause the build to fail if this has
happened, as well as changing sbat_var.S to to use '.ascii' and '.byte'
to construct the data, rather than using '.asciz'.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Fix preserve_sbat_uefi_variable() logic</title>
<updated>2022-05-23T19:54:58+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2022-05-18T23:32:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=759f061e46b4b9b9b74626ad8bb566c49e12e5c1'/>
<id>urn:sha1:759f061e46b4b9b9b74626ad8bb566c49e12e5c1</id>
<content type='text'>
preserve_sbat_uefi_variable() shoud really deal with the sbat
metadata version as a numerical value that could gain more digits.

It also needs to only compare the datestamp since the actual
metadata can grow and shrink

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>SBAT revocation management</title>
<updated>2022-05-17T23:01:46+00:00</updated>
<author>
<name>Jan Setje-Eilers</name>
<email>jan.setjeeilers@oracle.com</email>
</author>
<published>2022-04-22T20:13:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=f81a7cc34e0b1a4f2d3104f44df80f93497eaa9e'/>
<id>urn:sha1:f81a7cc34e0b1a4f2d3104f44df80f93497eaa9e</id>
<content type='text'>
Support for updating SBAT revocations to latest or previous revocations.

Allow SBAT revocations to be reset to empty metadata only when UEFI
Secure Boot is disabled.

Signed-off-by: Jan Setje-Eilers &lt;Jan.SetjeEilers@oracle.com&gt;
</content>
</entry>
<entry>
<title>test_verify_sbat_null_sbat_section(): call cleanup_sbat_var()</title>
<updated>2021-03-28T17:20:04+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2021-03-27T22:21:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=2eaea5dae5b6427b9e034e067ccacfc0b76aa9d0'/>
<id>urn:sha1:2eaea5dae5b6427b9e034e067ccacfc0b76aa9d0</id>
<content type='text'>
This fixes a memory leak caused by test_verify_sbat_null_sbat_section()
not calling cleanup_sbat_var().

Before:
==2591367== Memcheck, a memory error detector
==2591367== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2591367== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==2591367== Command: ./test-sbat
==2591367==
==2591367==
==2591367== HEAP SUMMARY:
==2591367==     in use at exit: 56 bytes in 1 blocks
==2591367==   total heap usage: 17 allocs, 16 frees, 5,382 bytes allocated
==2591367==
==2591367== 56 bytes in 1 blocks are definitely lost in loss record 1 of 1
==2591367==    at 0x4845464: calloc (vg_replace_malloc.c:1117)
==2591367==    by 0x402AEB: parse_sbat_var_data (sbat.c:234)
==2591367==    by 0x40189D: UnknownInlinedFun (test-sbat.c:445)
==2591367==    by 0x40189D: main (test-sbat.c:1033)
==2591367==
==2591367== LEAK SUMMARY:
==2591367==    definitely lost: 56 bytes in 1 blocks
==2591367==    indirectly lost: 0 bytes in 0 blocks
==2591367==      possibly lost: 0 bytes in 0 blocks
==2591367==    still reachable: 0 bytes in 0 blocks
==2591367==         suppressed: 0 bytes in 0 blocks
==2591367==
==2591367== For lists of detected and suppressed errors, rerun with: -s
==2591367== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

After:
==2645037== Memcheck, a memory error detector
==2645037== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2645037== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==2645037== Command: ./test-sbat
==2645037==
==2645037==
==2645037== HEAP SUMMARY:
==2645037==     in use at exit: 0 bytes in 0 blocks
==2645037==   total heap usage: 17 allocs, 17 frees, 5,382 bytes allocated
==2645037==
==2645037== All heap blocks were freed -- no leaks are possible
==2645037==
==2645037== For lists of detected and suppressed errors, rerun with: -s
==2645037== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
</feed>
