Skip to content

[Bug]: StandaloneMmPkg does not clear memory protections on unloaded images #1244

@cfernald

Description

@cfernald

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

In StandaloneMmPkg when a binary is loaded it's code sections will be marked with the read-only memory protections. If this image then fails, it will be unloaded and its memory reclaimed. However, the core does not unset the read-only attribute and if that address is re-used later it will cause an access violation when attempting to write to the memory still marked as read-only.

Expected Behavior

The memory should be restored to the default RW so future allocations of that memory are consistent with other memory allocations.

Steps To Reproduce

Reproduction steps available internally.

Build Environment

- OS(s): N/A
- Tool Chain(s): N/A
- Targets Impacted: N/A

Version Information

2405 Release

Urgency

High

Are you going to fix this?

I will fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Metadata

Metadata

Assignees

Labels

type:bugSomething isn't workingurgency:highSignificant with a critical impact

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions