Skip to content

Conversation

@makubacki
Copy link
Member

Description

MsGraphicsPkg/RenderingEngineDxe: Defensive checks for global GOP pointer

Verify mParentGop is valid before use.


MsGraphicsPkg/RenderingEngineDxe: Defensive checks for global GOP pointer

Verify mParentGop is valid before use.


  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

  • CI, build and verify GOP start and operation in QEMU Q35, and "disconnect -r" succeeds

Integration Instructions

  • N/A

…nter

Verify `mParentGop` is valid before use.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
1. Open the `mMsGopOverrideProtocolGuid` in the `Start()` function
   with the attributes of `EFI_OPEN_PROTOCOL_BY_DRIVER` so that
   `SREDriverStop()` will be called by `DisconnectController()`
2.`InitializeRenderingEngine()` installs `gEfiGraphicsOutputProtocolGuid`
   onto the `mSREGopHandle` handle. `SREDriverStop()` uninstalls
   `gEfiGraphicsOutputProtocolGuid` on `mImageHandle`. This change
   updates the uninstall to use `mSREGopHandle` instead.

Also, `UninstallMultipleProtocolInterfaces()` takes pointers not
double pointers, so the casts are updated accordingly.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki makubacki requested review from apop5 and vineelko January 23, 2026 01:19
@makubacki makubacki self-assigned this Jan 23, 2026
@makubacki makubacki merged commit 1a2da10 into microsoft:release/202502 Jan 23, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants