Skip to content

os/exec: LookPath considers paths containing ":" to be absolute on windows #71469

Open
@rolandshoemaker

Description

@rolandshoemaker

os/exec.LookPath considers all paths containing : to be absolute, as one use of the colon is to indicate drive letters. Unfortunately it is also used for "alternate data streams" on NTFS filesystems, which allow attaching additional data to a file, accessed using a special suffix.

This can result in LookPath returning a file (with a ADS) in the current directory unexpectedly.

This is a PUBLIC track security issue per our security policy.

Thanks to Juho Forsén for reporting this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-WindowsSecurity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions