16ab868efc
- Update to 0.4 - Rebase patches + shim-suse-build.patch + shim-mokmanager-support-crypt-hash-method.patch + shim-bnc804631-fix-broken-bootpath.patch + shim-bnc798043-no-doulbe-separators.patch + shim-bnc807760-change-pxe-2nd-loader-name.patch + shim-bnc808106-correct-certcount.patch + shim-mokmanager-ui-revamp.patch - Add patches + shim-merge-lf-loader-code.patch: merge the Linux Foundation loader UI code + shim-fix-pointer-casting.patch: fix a casting issue and the size of an empty vendor cert + shim-fix-simple-file-selector.patch: fix the buffer allocation in the simple file selector - Remove upstreamed patches + shim-support-mok-delete.patch + shim-reboot-after-changes.patch + shim-clear-queued-key.patch + shim-local-key-sign-mokmanager.patch + shim-get-2nd-stage-loader.patch + shim-fix-loadoptions.patch - Remove unused patch: shim-mokmanager-new-pw-hash.patch and shim-keep-unsigned-mokmanager.patch - Install the vendor certificate to /etc/uefi/certs OBS-URL: https://build.opensuse.org/request/show/184039 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory/shim?expand=0&rev=28
62 lines
1.9 KiB
Diff
62 lines
1.9 KiB
Diff
From 23002e8e5c03800845afae8aaa7e42770c3e5d17 Mon Sep 17 00:00:00 2001
|
|
From: Peter Jones <pjones@redhat.com>
|
|
Date: Tue, 11 Jun 2013 14:58:25 -0400
|
|
Subject: [PATCH] Fix some pointer casting issues.
|
|
|
|
This also fixes the size of an empty vendor_cert or dbx_cert.
|
|
|
|
Signed-off-by: Peter Jones <shim-owner@fedoraproject.org>
|
|
---
|
|
cert.S | 2 +-
|
|
shim.c | 9 +++++----
|
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/cert.S b/cert.S
|
|
index 2ed9b6d..66a05b8 100644
|
|
--- a/cert.S
|
|
+++ b/cert.S
|
|
@@ -32,5 +32,5 @@ vendor_cert:
|
|
.size vendor_cert_size, 4
|
|
.section .vendor_cert, "a", @progbits
|
|
vendor_cert_size:
|
|
- .long 1
|
|
+ .long 0
|
|
#endif
|
|
diff --git a/shim.c b/shim.c
|
|
index 94b9710..7d43f04 100644
|
|
--- a/shim.c
|
|
+++ b/shim.c
|
|
@@ -59,7 +59,7 @@ static UINT32 load_options_size;
|
|
*/
|
|
extern UINT8 vendor_cert[];
|
|
extern UINT32 vendor_cert_size;
|
|
-extern EFI_SIGNATURE_LIST *vendor_dbx;
|
|
+extern UINT8 vendor_dbx[];
|
|
extern UINT32 vendor_dbx_size;
|
|
|
|
#define EFI_IMAGE_SECURITY_DATABASE_GUID { 0xd719b2cb, 0x3d3a, 0x4596, { 0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f }}
|
|
@@ -359,16 +359,17 @@ static EFI_STATUS check_blacklist (WIN_CERTIFICATE_EFI_PKCS *cert,
|
|
UINT8 *sha256hash, UINT8 *sha1hash)
|
|
{
|
|
EFI_GUID secure_var = EFI_IMAGE_SECURITY_DATABASE_GUID;
|
|
+ EFI_SIGNATURE_LIST *dbx = (EFI_SIGNATURE_LIST *)vendor_dbx;
|
|
|
|
- if (check_db_hash_in_ram(vendor_dbx, vendor_dbx_size, sha256hash,
|
|
+ if (check_db_hash_in_ram(dbx, vendor_dbx_size, sha256hash,
|
|
SHA256_DIGEST_SIZE, EfiHashSha256Guid) ==
|
|
DATA_FOUND)
|
|
return EFI_ACCESS_DENIED;
|
|
- if (check_db_hash_in_ram(vendor_dbx, vendor_dbx_size, sha1hash,
|
|
+ if (check_db_hash_in_ram(dbx, vendor_dbx_size, sha1hash,
|
|
SHA1_DIGEST_SIZE, EfiHashSha1Guid) ==
|
|
DATA_FOUND)
|
|
return EFI_ACCESS_DENIED;
|
|
- if (check_db_cert_in_ram(vendor_dbx, vendor_dbx_size, cert,
|
|
+ if (check_db_cert_in_ram(dbx, vendor_dbx_size, cert,
|
|
sha256hash) == DATA_FOUND)
|
|
return EFI_ACCESS_DENIED;
|
|
|
|
--
|
|
1.8.1.4
|
|
|