summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Ching-Pang Lin <glin@suse.com>2012-09-21 15:10:31 +0800
committerGary Ching-Pang Lin <glin@suse.com>2012-09-21 15:10:31 +0800
commit6577945fba87ace4d214c2764cee8ba0fd6ab431 (patch)
treec3086f4391ed1354f63d23a62798d98746a51995
parentf775849e129e1fa326f17582db7c3b410043a92e (diff)
downloadefi-boot-shim-6577945fba87ace4d214c2764cee8ba0fd6ab431.tar.gz
efi-boot-shim-6577945fba87ace4d214c2764cee8ba0fd6ab431.zip
Reject the binary when there is no key in MokList
-rw-r--r--shim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shim.c b/shim.c
index 43297297..73b2feb7 100644
--- a/shim.c
+++ b/shim.c
@@ -617,8 +617,10 @@ static EFI_STATUS verify_buffer (char *data, int datasize,
}
CopyMem(&MokNum, MokListData, sizeof(UINT32));
- if (MokNum == 0)
+ if (MokNum == 0) {
+ status = EFI_ACCESS_DENIED;
goto done;
+ }
list = build_mok_list(MokNum,
(void *)MokListData + sizeof(UINT32),