Skip to content

x/sys/unix: Faccessat has unused flags parameter on Linux  #25845

@rudis

Description

@rudis

The faccessat(2) syscall on Linux takes three arguments (see https://github.com/torvalds/linux/blob/8efcf34a263965e471e3999904f94d1f6799d42a/fs/open.c#L434), but Go's signature has an additional flags argument:

 //sys   Faccessat(dirfd int, path string, mode uint32, flags int) (err error)

This is problematic as the extra argument is ignored by the kernel but there's no indication in the source code/during compilation. As the only possible argument AT_SYMLINK_NOFOLLOW can be used to prevent following symlinks this omission might have a security impact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.OS-Linux

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions