summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-06-19 21:43:46 +0000
committergVisor bot <gvisor-bot@google.com>2020-06-19 21:43:46 +0000
commit6fc5c7d5310e22738e944841605b2d3adaede962 (patch)
treeff387d3aeac8b81ec5477188f49f1708261cfcfb /pkg/sentry/syscalls/linux
parente0cfb2ae4f18eba3ba2a65fcead6fcce1e3b4c9b (diff)
parentad9f4691741cfada0ae09f73053d6195d43465ae (diff)
Merge release-20200608.0-99-gad9f46917 (automated)
Diffstat (limited to 'pkg/sentry/syscalls/linux')
-rw-r--r--pkg/sentry/syscalls/linux/vfs2/filesystem.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/filesystem.go b/pkg/sentry/syscalls/linux/vfs2/filesystem.go
index 46d3e189c..5dac77e4d 100644
--- a/pkg/sentry/syscalls/linux/vfs2/filesystem.go
+++ b/pkg/sentry/syscalls/linux/vfs2/filesystem.go
@@ -313,6 +313,9 @@ func symlinkat(t *kernel.Task, targetAddr usermem.Addr, newdirfd int32, linkpath
if err != nil {
return err
}
+ if len(target) == 0 {
+ return syserror.ENOENT
+ }
linkpath, err := copyInPath(t, linkpathAddr)
if err != nil {
return err