<feed xmlns='http://www.w3.org/2005/Atom'>
<title>efi-boot-shim.git/mok.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-03-14T15:05:05+00:00</updated>
<entry>
<title>mirror_mok_db(): Free our mok variable name correctly</title>
<updated>2025-03-14T15:05:05+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-03-12T18:19:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=38f0a9c2ee9635cbaab9d7d4aa4664027c913cee'/>
<id>urn:sha1:38f0a9c2ee9635cbaab9d7d4aa4664027c913cee</id>
<content type='text'>
When we've split a mok variable into name0..nameN, we re-use the same
buffer over and over, but we never free it at the end.

This frees it.

Resolves: Coverity CID 457501
Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>mirror_one_mok_variable(): fix a memory leak on TPM log error.</title>
<updated>2025-03-14T15:05:05+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-03-12T18:14:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=92630f2e2d63f89bf78842bd0d18fa115270b39c'/>
<id>urn:sha1:92630f2e2d63f89bf78842bd0d18fa115270b39c</id>
<content type='text'>
If measuring a mok variable to the TPM returns failure, this function
returns, but never frees the data intended to be measured.

This frees it.

Resolves: Coverity CID 457503
Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>mirror_mok_db(): get rid of an unused variable+allocation</title>
<updated>2025-03-14T15:05:05+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-03-12T18:11:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=b427a3431ee27460dafc7e33e4cbe49de3baf4d7'/>
<id>urn:sha1:b427a3431ee27460dafc7e33e4cbe49de3baf4d7</id>
<content type='text'>
Coverity identified a resource leak of namen8 in mirror_mok_db(), and
upon further examination nothing is even using it any more; we're
allocating it and populating it for nothing.

This removes all that.

Resolves: Coverity CID 457510
Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Some save_logs() improvements.</title>
<updated>2025-02-26T14:39:46+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-02-25T19:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=9c423e09cd9a0196888253b16fe7022deadc20fc'/>
<id>urn:sha1:9c423e09cd9a0196888253b16fe7022deadc20fc</id>
<content type='text'>
In d972515e608e ("Save the debug and error logs in mok-variables") had a
few deficiencies: 1) the size of the result table isn't correctly
computed when either errlog or dbglog is 0 sized (much more likely for
the former), 2) when we save the error log we leak the allocation for
the previous mok variables, and 3) original mok variables were allocated
with AllocatePages(), but the new ones were allocated with
AllocateZeroPool().  The former guarantees page alignment, which we want
here.

This fixes all three of these.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Add shim's current NX_COMPAT status to HSIStatus</title>
<updated>2025-02-26T00:40:54+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-02-21T00:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=89e615081af5fbafefeae5b09def3a003e467838'/>
<id>urn:sha1:89e615081af5fbafefeae5b09def3a003e467838</id>
<content type='text'>
hughsie asked me to also make it observable at runtime whether the shim
binary that was used to boot was set as NX_COMPAT or not.

This adds that into the HSIStatus data as "shim-has-nx-compat-set".

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Add DXE Services information to HSI</title>
<updated>2025-02-24T20:58:16+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-02-20T19:44:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=9269e9b0aa15ae9832f7eba6c5eeef0c5e1f4edb'/>
<id>urn:sha1:9269e9b0aa15ae9832f7eba6c5eeef0c5e1f4edb</id>
<content type='text'>
This adds three more entries to our HSI data:

has-dxe-services-table: technically only tells us if UEFI's
			LocateProtocol will give us a DXE services
			table, but practically also tells us if the
			machine is implementing DXE in any way.
has-get-memory-space-descriptor: tells us if DXE-&gt;GetMemorySpaceDescriptor
                                 is populated
has-set-memory-space-descriptor: tells us if DXE-&gt;SetMemorySpaceDescriptor
                                 is populated

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Mirror some more efi variables to mok-variables</title>
<updated>2025-02-24T20:26:20+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2024-06-27T16:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=fc0cface403b72cc13cb94e3cdb1f439af69ea89'/>
<id>urn:sha1:fc0cface403b72cc13cb94e3cdb1f439af69ea89</id>
<content type='text'>
Some machines have EFI Boot Services variables but not Runtime
variables, and thus it can be quite difficult to figure out what's going
on once the system is booted.

This changes mok variable mirroring to also mirror the following
variables to the mok variable config table:

  AuditMode
  BootOrder
  BootCurrent
  BootNext
  Boot0000
  Boot0001
  Boot0002
  Boot0003
  Boot0004
  Boot0005
  Boot0006
  DeployedMode
  SecureBoot
  SetupMode
  SignatureSupport
  Timeout
  PK
  KEK
  db
  dbx
  Kernel_SkuSiStatus

There's no attempt to do anything involving creating runtime or
boot-services only variables, it just mirrors them into the config
table so they'll be exposed there.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>Move mok state variable data flag definitions to the header.</title>
<updated>2025-02-24T20:26:20+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2025-02-18T20:10:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=b216543d691050d6cdd37c3500571cf67882f1bc'/>
<id>urn:sha1:b216543d691050d6cdd37c3500571cf67882f1bc</id>
<content type='text'>
Previously the mok mirror state flags were only used in the mok
mirroring code.  But there are other consumers of that data, namely our
variable test cases, and it's useful for them to be able to check the
flags.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>shim: add HSIStatus feature</title>
<updated>2025-02-24T20:24:24+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2024-05-15T20:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=848667d0f3a99401d93c93b3af16b55e3fb28cea'/>
<id>urn:sha1:848667d0f3a99401d93c93b3af16b55e3fb28cea</id>
<content type='text'>
hughsie asked me if I can make shim tell userland what kinds of accesses
are allowed to the heap, stack, and allocations on the running platform,
so that these could be reported up through fwupd's Host Security ID
program (see https://fwupd.github.io/libfwupdplugin/hsi.html ).

This adds a new config-only (i.e. not a UEFI variable) variable
generated during boot, "/sys/firmware/efi/mok-variables/HSIStatus",
which tells us those properties as well as if the EFI Memory Attribute
Protocol is present.

Signed-off-by: Peter Jones &lt;pjones@redhat.com&gt;
</content>
</entry>
<entry>
<title>mok variables: add a format callback</title>
<updated>2025-02-24T20:24:24+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@redhat.com</email>
</author>
<published>2024-05-15T20:01:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/efi-boot-shim.git/commit/?id=887c0edab93c52e2558047897847166b73dc8c3a'/>
<id>urn:sha1:887c0edab93c52e2558047897847166b73dc8c3a</id>
<content type='text'>
This adds a member to the mok_state_variable struct to provide a
callback function for formatting external data.  It basically has
snprintf()-like semantics for filling the buffer, but without the actual
printf-like formatting bits.

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