Skip to content

os/exec: Plan 9 build has been broken by a Windows security fix (also breaks 1.19.3 and 1.18.8) #56544

@millerresearch

Description

@millerresearch

CL 446915 fixes a security vulnerability on Windows (#56284), by rejecting environment variables containing NUL in os/exec.Cmd. In Plan 9, NULs in environment variables are not only permitted but required: the path variable uses NUL as the os.PathListSeparator character. Since the environment almost always contains path, this effectively breaks os/exec, on which go build depends.

The change has already been back-ported to 1.19.3 and 1.18.8, so those releases also won't build for Plan 9.

Plan 9 does not exhibit the vulnerability to NULs because it implements environment variables in a completely different way.

Therefore we could safely correct this issue by making the rejection of NUL conditional on runtime.GOOS != "plan9" or on os.PathListSeparator != '\000'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.OS-Plan9SoonThis needs action soon. (recent regressions, service outages, unusual time-sensitive situations)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions