From 1cc497f053c9345b78167840f5e4a48951db8268 Mon Sep 17 00:00:00 2001 From: Matthijs Lavrijsen Date: Tue, 25 May 2021 21:08:07 +0200 Subject: EfiDSEFix: improve g_CiOptions address validation - Verify expected lengths of instructions - Verify CipInitialize is in PAGE - Verify g_CiOptions is in either .data or CiPolicy Fixes #31 (regression due to KB5003173 fix) --- Application/EfiDSEFix/src/EfiDSEFix.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Application/EfiDSEFix/src/EfiDSEFix.h') diff --git a/Application/EfiDSEFix/src/EfiDSEFix.h b/Application/EfiDSEFix/src/EfiDSEFix.h index 0a99540..e7cb109 100644 --- a/Application/EfiDSEFix/src/EfiDSEFix.h +++ b/Application/EfiDSEFix/src/EfiDSEFix.h @@ -44,6 +44,14 @@ MapFileSectionView( _Out_ PSIZE_T ViewSize ); +BOOLEAN +AddressIsInSection( + _In_ PUCHAR ImageBase, + _In_ PUCHAR Address, + _In_ PIMAGE_NT_HEADERS NtHeaders, + _In_ PCCH SectionName + ); + PVOID GetProcedureAddress( _In_ ULONG_PTR DllBase, -- cgit v1.2.3