Skip to content

Comments

SwmDialog: Fix missing NULL terminator for UninstallMultipleProtocolInterfaces#831

Merged
makubacki merged 1 commit intomicrosoft:release/202502from
joschock:swm_destructor_fix
Feb 18, 2026
Merged

SwmDialog: Fix missing NULL terminator for UninstallMultipleProtocolInterfaces#831
makubacki merged 1 commit intomicrosoft:release/202502from
joschock:swm_destructor_fix

Conversation

@joschock
Copy link
Contributor

Description

SwmDialogsDestructor calls UninstallMultipleProtocolInterfaces() which takes a Null-terminated list of <guid, interface> pairs to uninstall. However, it fails to include the NULL terminator, which causes an attempt to uninstall stack garbage. This PR adds the NULL termination to the call to correctly terminate the list.

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

How This Was Tested

Unloaded a driver before/after the fix, observed that attempt to uninstall non-existent protocol no longer occurs.

Integration Instructions

N/A

Copy link
Member

@makubacki makubacki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the author copied/pasted code from elsewhere that typically ends the variadic list with a single NULL as the terminator for the protocol GUID portion of the pair and they have the more unusual case of uninstalling a protocol without an interface structure.

@makubacki makubacki requested review from kuqin12 and os-d February 18, 2026 20:46
@makubacki makubacki added the type:bug Something isn't working label Feb 18, 2026
@makubacki makubacki merged commit 00b1fb1 into microsoft:release/202502 Feb 18, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants