Skip to content

mkdir, mkfifo, mknod: umask changes are not serialized or panic-safe #14994

Description

@abendrothj

mkdir, mkfifo and mknod set the process umask directly around a syscall and restore it afterwards. Overlapping calls can restore each other's value and leave the wrong umask, and a panic between the set and the restore leaks the temporary mask into the rest of the run. mkdir also reads the umask before that window, so the mask it derives can be stale.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions