summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-06-30Improve our debuginfo path printPeter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-29Make sure our build-id notes wind up at a reasonable place.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-29Only be verbose the first time secure_mode() is called.Peter Jones
It's annoying to find out we're not in SB mode over and over. Really it is. Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-29Add a conditional point for a debugger to attach.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-29More incorrect unsigned vs signed fixups from yours truly.Peter Jones
Woops. Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-29Don't print anything or delay when start_image() succeeds.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-16MokManager: Nerf SHA-1 again for actual hashes and signatures.Peter Jones
Nobody should be deploying SHA-1. No hardware deploys it, and the rate of change on https://en.wikipedia.org/wiki/SHA-1#Attacks is wildly uninspiring. Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-16MokManager: fix comparison between signed and unsigned integerGary Ching-Pang Lin
Patch from Johannes Segitz <jsegitz@suse.com>
2015-06-16MokManager: Discard the list contains an invalid signatureGary Ching-Pang Lin
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16MokManager: Support SHA224, SHA384, and SHA512Gary Ching-Pang Lin
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16MokManager: Add more key list safe checksGary Ching-Pang Lin
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16MokManager: fix the return value and typeGary Ching-Pang Lin
There are some functions that the return value and the type didn't match. Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16MokManager: Support SHA1 hash in MOKGary Ching-Pang Lin
Add SHA1 hash support and amend the code to make it easier to support other SHA digests.
2015-06-16MokManager: fix the hash list counting in deleteGary Ching-Pang Lin
match_hash() requests the number of keys in a list and it was mistakenly replaced with the size of the Mok node. This would made MokManager to remove the whole Mok node instead of one hash. Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16MokManager: calculate the variable size correctlyGary Ching-Pang Lin
MokSize of the hash signature list includes the owner GUID, so we should not add the 16bytes compensation. Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16Make shim to check MokXAuth for MOKX resetGary Ching-Pang Lin
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16Verify the EFI images with MOK blacklistGary Ching-Pang Lin
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16Copy the MOK blacklist to a RT variableGary Ching-Pang Lin
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16MokManager: Write the hash list properlyGary Ching-Pang Lin
also return to the previous entry in the list Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16MokManager: Match all hashes in the listGary Ching-Pang Lin
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16MokManager: delete the hash properlyGary Ching-Pang Lin
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16MokManager: show the hash list properlyGary Ching-Pang Lin
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16Support MOK blacklistGary Ching-Pang Lin
The new blacklist, MokListX, stores the keys and hashes that are banned. Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-06-16Fix console_print_box*() parameters.Peter Jones
When we made lib build with the correct CFLAGS, it inherited -Werror=sign-compare, and I fixed up some parameters on console_print_box() and console_print_box_at() to avoid sign comparison errors. The fixups were *completely wrong*, as some behavior relies on negative values. So this fixes them in a completely different way, by casting appropriately to signed types where we're doing comparisons. Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-11Ensure that apps launched by shim get correct BS->Exit() behaviorPeter Jones
Right now applications run by shim get our wrapper for Exit(), but it doesn't do as much cleanup as it should - shim itself also exits, but currently is not doing all the cleanup it should be doing. This changes it so all of shim's cleanup is also performed. Based on a patch and lots of review from Gary Lin. Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-11Don't leave in_protocol==1 when shim_verify() isn't enforcing.Peter Jones
Right now if shim_verify() sees secure_mode()==0, it exits with EFI_SUCCESS, but accidentally leaves in_protocol=1. This means any other call will have supressed error/warning messages. That's wrong, so don't do it. Signed-off-by: Peter Jones <pjones@redhat.com>
2015-06-04Only run MokManager if asked or a security violation occurs.Peter Jones
Don't run MokManager on any random error from start_image(second_stage); only try it if it /is/ the second stage, or if start_image gave us EFI_SECURITY_VIOLATION. Signed-off-by: Peter Jones <pjones@redhat.com>
2015-05-12More GCC 5 fixes: stdarg.h and other include tweaks, cherry-pick fromMathieu Trudel-Lapierre
d51739a4.
2015-05-12Fix build with GCC 5, forcing -std=gnu89 to not rely on stdint.hMathieu Trudel-Lapierre
required by efibind.h, and not found with -nostdinc. (LP: #1429978)
2015-05-12Make the build failed with objcopy < 2.24Gary Ching-Pang Lin
The wildcard support was introduced in objcopy since binutils 2.24. However, objcopy < 2.24 never issues any warning message with the wildcard and a faulty binary will be generated. This commit makes the build failed as a notification for the usage of binutils < 2.24. Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-05-12Update Cryptlib and opensslGary Ching-Pang Lin
Update Cryptlib to r16559 and openssl to 0.9.8zf Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2015-05-12releasing package shim version 0.8-0ubuntu2Steve Langasek
2015-05-11* New upstream release.Mathieu Trudel-Lapierre
- Clarify meaning of insecure_mode. (LP: #1384973) * debian/patches/CVE-2014-3675.patch, debian/patches/CVE-2014-3677.patch, debian/patches/0001-Update-openssl-to-0.9.8za.patch: dropped, included in the upstream release. * debian/patches/sbsigntool-not-pesign,debian/patches/second-stage-path: refreshed.
2015-05-10Reapplying all patchesMathieu Trudel-Lapierre
2015-05-07Add bug tag for insecure_mode semantics changes in 0.8.Mathieu Trudel-Lapierre
2015-05-06debian/patches/sbsigntool-not-pesign,debian/patches/second-stage-path:Mathieu Trudel-Lapierre
refreshed.
2015-05-06debian/patches/CVE-2014-3675.patch, debian/patches/CVE-2014-3677.patch,Mathieu Trudel-Lapierre
debian/patches/0001-Update-openssl-to-0.9.8za.patch: dropped, included in the upstream release.
2015-05-06New upstream release.Mathieu Trudel-Lapierre
2015-05-06Import upstream version 0.8Mathieu Trudel-Lapierre
2015-05-06Unapplying patches to prevent spurious conflicts.Mathieu Trudel-Lapierre
2015-05-05Merge upstream git branch for release 0.7Steve Langasek
2015-05-05Fix the version number; this was uploaded for some reason as -0ubuntu4, not ↵Steve Langasek
-0ubuntu3.
2015-04-15Explicitly request sysv-style ELF hash sectionsMatthew Garrett
We depend on there being a .hash section in the binary, and that's not the case on distributions that default to building with gnu-style ELF hashes. Explicitly request sysv-style hashes in order to avoid building broken binaries. Signed-off-by: Matthew Garrett <mjg59@coreos.com>
2015-04-13gcc 5.0 changes some include bits, so copy what arm does on x86.Peter Jones
Basically they messed around with stdarg some and now we need to do it the other way. Signed-off-by: Peter Jones <pjones@redhat.com>
2015-04-13Make lib/ use the right CFLAGS.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2015-04-13Make lib/ build right with the cflags it should be using...Peter Jones
... but isn't. Signed-off-by: Peter Jones <pjones@redhat.com>
2015-04-13Fix length of allocated buffer for boot option comparison.Laszlo Ersek
The following commit: commit 4aac8a1179e160397d7ef8f1e3232cfb4f3373d6 Author: Gary Ching-Pang Lin <glin@suse.com> Date: Thu Mar 6 10:57:02 2014 +0800 [fallback] Fix the data size for boot option comparison corrected the data size used for comparison, but also reduced the allocation so it doesn't include the trailing UTF16LE '\0\0' at the end of the string, with the result that the trailer of the buffer containing the string is overwritten, which OVMF detects as memory corruption. Increase the size of the storage buffer in a few places to correct this problem. Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Gary Ching-Pang Lin <glin@suse.com>
2015-04-13fallback: Fix comparison between signed and unsigned in debugging code.Richard W.M. Jones
fallback.c: In function ‘update_boot_order’: fallback.c:334:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (j = 0 ; j < size / sizeof (CHAR16); j++) ^ fallback.c: In function ‘add_to_boot_list’: fallback.c:402:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (i = 0; i < s; i++) { ^ Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
2015-04-13Don't install our protocols if we're not in secure mode.Peter Jones
System services haven't been hooked if we're not in secure mode, so do_exit() will never be called. In this case shim never gets control once grub exits, which means if booting fails and the firmware tries another boot option, it'll attempt to talk to the shim protocol we installed. This is wrong, because it is allowed to have been cleared from ram at this time, since the task it's under has exited. So just don't install the protocols when we're not enforcing. This version also has a message and a 2-second stall after calling start_image(), so that we can tell if we are on the expected return path of our execution flow.
2015-04-13Align the sections we're loading, and check for validity /after/ discarding.Peter Jones
Turns out a) the codegen on aarch64 generates code that has real alignment needs, and b) if we check the length of discardable sections before discarding them, we error for no reason. So do the error checking in the right order, and always enforce some alignment because we know we have to. Signed-off-by: Peter Jones <pjones@redhat.com>