Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pass by reference bug on the module side for windows error exploit #18406

Merged

Conversation

bwatters-r7
Copy link
Contributor

This fixes a bug found by @cdelafuente-r7 where we're using a pass-by-reference for strings from the mkdir method to the cleanup methods. This means that if we alter the string used to create the directory later in the module, the cleanup method tries to delete whatever is in the string at the end of the module, rather than what was in it when we called mkdir. To fix it in this module, I just added a local method called clone_mkdir where we clone the string before passing it into mkdir.

We're working on a fix that will negate the need for this here: #18403

@bwatters-r7 bwatters-r7 marked this pull request as ready for review September 27, 2023 15:05
@cdelafuente-r7 cdelafuente-r7 self-assigned this Sep 27, 2023
@cdelafuente-r7
Copy link
Contributor

Thanks @bwatters-r7 for this fix! It looks good to me. I retested the module and verified the directories were properly cleaned up. Thanks!

@cdelafuente-r7 cdelafuente-r7 merged commit bc8179e into rapid7:master Sep 27, 2023
@cdelafuente-r7 cdelafuente-r7 added the rn-no-release-notes no release notes label Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants