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 the handling of empty args strings, on Windows #6460

Merged
merged 8 commits into from
May 25, 2020

Conversation

mike-myers-tob
Copy link
Member

Closes #6403

As seen in Windows' startup_items, if there's a startup item entry in the registry key which does not have an associated value, then an empty string is passed to a osquery helper function that tries to parse it into an args array. But it uses a Windows API that, if passed an empty string, fills in the command line args of the current osquery process, instead. This PR catches the empty string before that happens.

osquery/utils/system/windows/env.cpp Outdated Show resolved Hide resolved
@theopolis theopolis merged commit c75ae5b into osquery:master May 25, 2020
@mike-myers-tob mike-myers-tob deleted the mike/fix-windows-startup-items branch September 23, 2020 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect presentation of empty registry data in "startup_items" table
2 participants