summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-06-16MokManager: delete the hash properlyGary 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-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-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-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-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-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-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-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-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-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-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/ 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-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-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-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-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>
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>
2014-12-11Add nostdinc to the CFLAGS for libGary Ching-Pang Lin
We don't need the headers from the standard include path. Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2014-12-11Add nostdinc to the CFLAGS for libGary Ching-Pang Lin
We don't need the headers from the standard include path. Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2014-10-13Bump version to 0.8Peter Jones