-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.release-blocker
Milestone
Description
What version of Go are you using (go version)?
1.6.2 and 1.9.2
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
linux/386 and linux/arm.
What did you do?
with this built as hightest,
package main
import (
"fmt"
"syscall"
)
func main() {
r0, _, e := syscall.RawSyscall(syscall.SYS_GETUID32, 0, 0, 0)
fmt.Println(uint32(r0), "/", e)
}and a user with a high uid,
sudo useradd --uid "$(( 0xfffffffe ))" --shell /bin/sh hightest(alternatively if you can't useradd, use chown to a numerical id, and chmod u+s, and change the code to use GETEUID instead of GETUID)
compare the output of sudo -u hightest id -u and sudo -u hightest hightest.
What did you expect to see?
4294967294 / errno 0
What did you see instead?
4294967295 / no such file or directory
The problem seems to be that in syscall/asm_linux_386.s, if the returned value is not less than 0xfffff001 it's treated as an error.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.release-blocker