Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/sys/unix: Add UMOUNT_NOFOLLOW constant #18316

Closed
schmichael opened this issue Dec 14, 2016 · 2 comments
Closed

x/sys/unix: Add UMOUNT_NOFOLLOW constant #18316

schmichael opened this issue Dec 14, 2016 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@schmichael
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.7.3 linux/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/schmichael/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build019656358=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

Enhancement

Add UMOUNT_NOFOLLOW = 0x8 constant to prevent symlink traversal attacks when unmounting filesystems.

Present since Linux 2.6.34: torvalds/linux@db1f05b

@bradfitz bradfitz added this to the Unreleased milestone Dec 14, 2016
@bradfitz bradfitz added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 14, 2016
@ianlancetaylor
Copy link
Contributor

Want to send a patch? https://golang.org/doc/contribute.html

@gopherbot
Copy link

CL https://golang.org/cl/46771 mentions this issue.

micanzhang pushed a commit to micanzhang/sys that referenced this issue Sep 12, 2017
Add the UMOUNT_NOFOLLOW on Linux, available since Linux 2.6.34. See
http://man7.org/linux/man-pages/man2/umount.2.html and
torvalds/linux@db1f05bb85d796

Fixes golang/go#18316

Change-Id: I5c7dafdbb311f287b6cf290aa8a0eaf2940b9834
Reviewed-on: https://go-review.googlesource.com/46771
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Jun 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants