Files
EDK2-fork/MdeModulePkg/Universal/HiiDatabaseDxe
DeepakX Singh c87ea47519 MdeModulePkg/HiiDatabaseDxe: Fix NULL Pointer access from EfiVarStore
Issue : When user access "Boot Maintenance Manager Menu/Secure Boot
 Configuration Menu" with PcdNullPointerDetectionPropertyMask|0x03 and
 PcdHeapGuardPageType|0x7FFF protection policy set,
 we get X64 Exception Type - 0E(#PF - Page-Fault)

Root cause : When user access "Boot Maintenance Manager Menu/Secure Boot
 Configuration Menu", BIOS calls FindQuestionDefaultSetting function and
 send EFI VarStore header pointer to AuthFindVariableData function.
 When header pointer is NULL, it send NULL pointer to AuthFindVariableData
 function and causes the page fault.

Fix : Database.c: In function FindQuestionDefaultSetting, added
 NULL pointers check, so that when EFI VarStore header argument is passed
 to AuthFindVariableData function, NULL pointer access will not happen.

Test: Cross verified while accessing the "Boot Maintenance Manager Menu/
 Secure Boot Configuration Menu" page.

Signed-off-by: DeepakX Singh <deepakx.singh@intel.com>
2025-06-09 14:38:29 +08:00
..