summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-10-02Remove "shim.cer" on "make clean".Peter Jones
If we don't do this, an old key winds up being reused and MokManager.efi.signed is signed with a different key than shim_cert reflects. Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-02Use CHAR8 not UINT8 for character work.Peter Jones
This gets rid of a lot of type casting that we don't need, and helps reduce warnings when I switch a bunch of gnu-efi stuff to taking const arguments. Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-02CompareMem expects void * and gcc complains.Peter Jones
Sorry about that. Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-02Fix wrong type on console_error() call.Peter Jones
Stupid L"". Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01If we fail to install our protocol, don't continue.Peter Jones
This shouldn't be exploitable unless you've got a way to make InstallProtocol fail and still, for example, have memory free to actually load and run something. Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01Clean up warnings.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01Conditionalize overriding the security policy.Peter Jones
Make OVERRIDE_SECURITY_POLICY a build option. Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01Merge console_control.h and console.hPeter Jones
Since these are topically the same thing, they can live together. Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01Make verbose stuff use console_notifyPeter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01MokManager needs to disable the graphics console.Peter Jones
Without this patch, on some machines we never see MokManager's UI. This protocol has never (I think?) been officially published, and yet I still have new hardware that needs it. If you're looking for a reference, look at: EdkCompatibilityPkg/Foundation/Protocol/ConsoleControl/ConsoleControl.c in the edk2 tree from Tiano. Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01Include shim's vendor_cert in MokListRTPeter Jones
There needs to be some way to communicate to the kernel that it's a trusted key, and since this mechanism already exists, it's by far the easiest.
2013-10-01Harden shim against non-participating bootloaders.Peter Jones
It works like this: during startup of shim, we hook into the system's ExitBootServices() and StartImage(). If the system's StartImage() is called, we automatically unhook, because we're chainloading to something the system can verify. When shim's verify is called, we record what kind of certificate the image was verified against. If the call /succeeds/, we remove our hooks. If ExitBootServices() is called, we check how the bootloader verified whatever it is loading. If it was verified by its hash, we unhook everything and call the system's EBS(). If it was verified by certificate, we check if it has called shim_verify(). If it has, we unhook everything and call the system's EBS() If the bootloader has not verified anything, and is itself verified by a certificate, we display a security violation warning and halt the machine.
2013-10-01Make vendor_cert/vendor_dbx actually replaceable by an external tool.Peter Jones
This moves them both to be computed at runtime from a pointer+offset rather than just a pointer, so that their real address can be entirely derived from the section they're in. This means you can replace the whole .vendor_cert section with a new one with certs that don't have the same size.
2013-10-01Remove TODO items fixed by merging lf_merge and lcp/lf-security-override.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-26Don't use LibGetVariable(), since it doesn't give us real error codes.Peter Jones
2013-09-26integrate security overrideGary Ching-Pang Lin
2013-09-26Clean up tarballs in "make clean"Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-26Merge variable retrieving functionsGary Ching-Pang Lin
2013-09-26Merge signature.h into efiauthenticated.h and guid.hGary Ching-Pang Lin
Conflicts: shim.c
2013-09-26Merge two PeImage.h into onePeter Jones
Conflicts: Makefile
2013-09-26Free unused memory spaceGary Ching-Pang Lin
2013-09-26Adjust the result of gmtime() to fit the definitionGary Ching-Pang Lin
2013-09-26Rand: check the status of the pseudorandom number generatorGary Ching-Pang Lin
2013-09-26MokManager: check the suffix of the key fileGary Ching-Pang Lin
2013-09-26MokManager: fetch more info from X509 nameGary Ching-Pang Lin
2013-09-26MokManager: reboot the system after clearing MOK passwordGary Ching-Pang Lin
2013-09-26MokManager: enhance the password prompt for SB stateGary Ching-Pang Lin
2013-09-26MokManager: rearrange the output of MOK infoGary Ching-Pang Lin
2013-09-26Disable floating points in b_printGary Ching-Pang Lin
The long double declaration will enable SSE and cause a compilation error. Disabling everything related to floating points avoids the error.
2013-09-26Enable openssl bio_printf()Gary Ching-Pang Lin
bio_printf() was replaced with a dummy function and this made several openssl functions useless. This commit adds the print functions back, so that we don't have to implement our own ASN1 time print function.
2013-09-26MokManager: enhance the password promptGary Ching-Pang Lin
2013-09-26MokManager: remove the duplicate get_keystroke()Gary Ching-Pang Lin
2013-09-26MokManager: draw the countdown screenGary Ching-Pang Lin
2013-09-26MokManager: Remove the unnecessary string duplicationGary Ching-Pang Lin
2013-09-26Correct the certificate count of the signature listGary Ching-Pang Lin
2013-09-26Since different distros name grub*.efi differently, make it compile-time.Peter Jones
Basically, if you don't want grub.efi, you do: make 'DEFAULT_LOADER=\\\\grubx64.efi' Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-26Define the PXE 2nd stage loader in the beginning of the fileGary Ching-Pang Lin
Make it easier to change the PXE 2nd stage loader. Conflicts: netboot.c
2013-09-26Remove double-separators from the bootpathGary Ching-Pang Lin
2013-09-26Fix the broken bootpathGary Ching-Pang Lin
- The file path from DevicePathToStr may use slash as the file seperator. Change all slashes to backslashes to avoid the strange bootpath. - Remove the redundant backslashes. - ImagePath no longer requires the leading backslash. - Fix a memory leak Based on the patch from Michal Marek <mmarek@suse.com>
2013-09-26MokManager: support Tradition DES hashGary Ching-Pang Lin
2013-09-26MokManager: support MD5-based crypt() hashGary Ching-Pang Lin
2013-09-26MokManager: support blowfish-based crypt() hashGary Ching-Pang Lin
Conflicts: Makefile
2013-09-26MokManager: support SHA512-based crypt() hashGary Ching-Pang Lin
2013-09-26MokManager: support crypt() password hashGary Ching-Pang Lin
The password format is introduced for the password hash generated by crypt(), so that the user can import the password hash from /etc/shadow. The packager, especially those who packages 3rd party drivers, can utilize this feature to import a 3rd party certificate without interfering the package installation. This commit implements the sha256-based crypt() hash function. Conflicts: Makefile MokManager.c
2013-09-26Make EFI_PATH easily resettable from the build command line.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-26Clean lib/, tooGary Ching-Pang Lin
2013-09-26simple_file: Allocate buffers for file entriesGary Ching-Pang Lin
The dir filter appends L'/' to the directory entries without allocating a new buffer, and this could crash the whole program.
2013-09-26Port MokManager to Linux Foundation loader UI codeMatthew Garrett
This is the first stage of porting the MokManager UI to the UI code used by the Linux Foundation UEFI loader.
2013-09-26Port MokManager to Linux Foundation loader UI codePeter Jones
This is the first stage of porting the MokManager UI to the UI code used by the Linux Foundation UEFI loader. Conflicts: MokManager.c
2013-09-26We have to declare SHIM_LOCK_GUID here as well.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com> Conflicts: MokManager.c