Skip to content

fork+exec fails to close other file descriptors #44

Description

@weissi

https://github.com/iCharlesHu/swift-experimental-subprocess/blob/7204d94bc468c0669a326fe584bf240e1eecbb2b/Sources/_SubprocessCShims/process_shims.c#L322

UNIX programs typically need to close all other open fds that they don't want to inherit into the child process after fork() but before execve(). This code fails to do so, this is security-relevant.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions