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

Correct the 'cwd' and 'root' columns of processes table on Windows #6459

Merged

Conversation

mike-myers-tob
Copy link
Member

Closes #4384 by pulling the correct Current Working Directory from the process's PEB, which is an approach that —although not a supported API— was already being taken in this table for other fields. Tested on Windows 10 x64.

@mike-myers-tob mike-myers-tob marked this pull request as ready for review May 23, 2020 05:03
Copy link
Member

@theopolis theopolis left a comment

Choose a reason for hiding this comment

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

Code look good, but I have not tested end-to-end.

@directionless directionless merged commit 8a9fb05 into osquery:master May 26, 2020
@directionless
Copy link
Member

@mike-myers-tob I've merged this. I assume you can test master

@mike-myers-tob
Copy link
Member Author

mike-myers-tob commented May 26, 2020

@mike-myers-tob I've merged this. I assume you can test master

https://dev.azure.com/trailofbits/osquery/_build/results?buildId=2898&view=logs&j=a29a2371-0793-5e14-39b9-20eb0beef0db&t=959c2940-2040-5744-cdbd-a6fa34023b5e&l=64

It looks like for Windows Server 2016 (what we use on Azure Pipelines), the code had a soft failure to acquire this information from the PEB. I'll try to reopen the issue, but the merge is fine because at least it works correctly for me on Windows 10 which is an improvement over the prior state of things.

UPDATE: the issue was not with Windows 2016, it's with PEB-less processes, a known issue tracked in #6263 so I will go close #4384 again for good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants