Skip to content

Handle inheritance should be constrained to specific handles on Windows? #100

Open
@jakepetroules

Description

@jakepetroules

Much like we have the file descriptor inheritance problems on Windows, it sounds like we have a similar issue on Windows. From CreateProcess docs:

By default, passing TRUE as the value of the bInheritHandles parameter causes all inheritable handles to be inherited by the new process. This can be problematic for applications which create processes from multiple threads simultaneously yet desire each process to inherit different handles.

This implies that we should use STARTUPINFOEXW and PROC_THREAD_ATTRIBUTE_LIST to pass the specific list of handles, or it sounds like we may run into over-inheritance therefore and security issues.

I'm not certain if this is what we need to do or how it might interact with STARTF_USESTDHANDLES, so would be great to get some input from @compnerd about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions