Security.Misc.MemoryOutsideEfiMemoryMapIsInaccessible was failing because it was not checking the return status of
ValidateRegionAttributes, which could return EFI_NO_MAPPING to indicate a given range was not in the page table. There are two independent criteria that can be satisfied to indicate that a region is inaccessible: it is marked EFI_MEMORY_RP or it is not mapped in the page table. This test was only checking the first case and not the second case. With this update it now correctly checks both cases.
[ ] Impacts functionality?
Functionality - Does the change ultimately impact how firmware functions?
Examples: Add a new library, publish a new PPI, update an algorithm, ...
[ ] Impacts security?
Security - Does the change have a direct security impact on an application,
flow, or firmware?
Description
Security.Misc.MemoryOutsideEfiMemoryMapIsInaccessible was failing because it was not checking the return status of ValidateRegionAttributes, which could return EFI_NO_MAPPING to indicate a given range was not in the page table. There are two independent criteria that can be satisfied to indicate that a region is inaccessible: it is marked EFI_MEMORY_RP or it is not mapped in the page table. This test was only checking the first case and not the second case. With this update it now correctly checks both cases.
How This Was Tested
Tested on Q35 and saw that the formerly failing test is now passing.
Integration Instructions
N/A.