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

Set FILE_FLAG_FIRST_PIPE_INSTANCE flag #269

Open
rtonini-r7 opened this issue Nov 15, 2022 · 0 comments
Open

Set FILE_FLAG_FIRST_PIPE_INSTANCE flag #269

rtonini-r7 opened this issue Nov 15, 2022 · 0 comments

Comments

@rtonini-r7
Copy link

Is it possible to set FILE_FLAG_FIRST_PIPE_INSTANCE when creating listener. It seems theres no API exposing this when calling winio.ListenPipe(...). We need this functionality as it will prevent Instance Creation Race Conditions as detailed here https://csandker.io/2021/01/10/Offensive-Windows-IPC-1-NamedPipes.html#instance-creation-race-condition.

I noticed the comment on listener call here

// The pipe must not already exist.

Is this enforced? From testing I noticed if I try to run a second listener with same pipe, same configs it gave me open \\.\pipe\pipename: Access is denied.

Does this ensure no instances of the pipe were created before me?

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

No branches or pull requests

1 participant