• Alexey Borzenkov's avatar
    syscall: return EINVAL when string arguments have NUL characters · a108369c
    Alexey Borzenkov authored
    Since NUL usually terminates strings in underlying syscalls, allowing
    it when converting string arguments is a security risk, especially
    when dealing with filenames. For example, a program might reason that
    filename like "/root/..\x00/" is a subdirectory or "/root/" and allow
    access to it, while underlying syscall will treat "\x00" as an end of
    that string and the actual filename will be "/root/..", which might
    be unexpected. Returning EINVAL when string arguments have NUL in
    them makes sure this attack vector is unusable.
    
    R=golang-dev, r, bradfitz, fullung, rsc, minux.ma
    CC=golang-dev
    https://golang.org/cl/6458050
    a108369c
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...
sudo.bash Loading commit data...