Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

SwmDialog: Fix missing NULL terminator for UninstallMultipleProtocolInterfaces#831

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

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

Conversation

@joschock

Copy link
Copy Markdown
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

@makubacki makubacki left a comment

Copy link
Copy Markdown
Member

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
apop5 pushed a commit that referenced this pull request Feb 25, 2026
…nterfaces (#831)

## 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.

- [x] 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
apop5 pushed a commit to apop5/mu_plus that referenced this pull request Feb 26, 2026
…nterfaces (microsoft#831)

## 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.

- [x] 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
apop5 pushed a commit to apop5/mu_plus that referenced this pull request Mar 3, 2026
…nterfaces (microsoft#831)

## 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.

- [x] 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
apop5 pushed a commit that referenced this pull request Mar 3, 2026
…nterfaces (#831)

## 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.

- [x] 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
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