[Bug]: UnprotectUefiImageMu Does Not Clear Attributes #1014
Labels
state:needs-triage
Needs to triaged to determine next steps
state:stale
Has not been updated in a long time
type:bug
Something isn't working
urgency:medium
Important with a moderate impact
Is there an existing issue for this?
Current Behavior
When unloading an image, UnprotectUefiImageMu calls into SetUefiMemoryAttributes with 0 for attributes. However that function gets the current attributes from the memory descriptor and ors those with the supplied attributes, which means the attributes can never be cleared. It also uses the ImageRecord->ImageSize as the range to clear, but that needs to be page aligned, as is done when the image is protected.
Expected Behavior
When unprotecting an image, the attributes should be cleared on a page aligned size.
Steps To Reproduce
Unprotect an image
Build Environment
Version Information
Urgency
Medium
Are you going to fix this?
I will fix it
Do you need maintainer feedback?
No maintainer feedback needed
Anything else?
No response
The text was updated successfully, but these errors were encountered: