diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-16 06:23:42 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-16 06:23:42 +0000 |
commit | 05c588e8167a660524df096ae8cb0661c559c9c4 (patch) | |
tree | 0a08ef76f8f14472903ed2d36a21e71720d40d10 /pkg/sentry/socket/netstack | |
parent | b6f9e0999586d237e3957e129c2105507f818aad (diff) | |
parent | c002fc36f9bbf0fe3ed8b7712c72376f8f8190c1 (diff) |
Merge release-20201005.0-87-gc002fc36f (automated)
Diffstat (limited to 'pkg/sentry/socket/netstack')
-rw-r--r-- | pkg/sentry/socket/netstack/netstack.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/socket/netstack/netstack.go b/pkg/sentry/socket/netstack/netstack.go index 87e30d742..211f07947 100644 --- a/pkg/sentry/socket/netstack/netstack.go +++ b/pkg/sentry/socket/netstack/netstack.go @@ -587,6 +587,11 @@ func (i *ioSequencePayload) Payload(size int) ([]byte, *tcpip.Error) { } v := buffer.NewView(size) if _, err := i.src.CopyIn(i.ctx, v); err != nil { + // EOF can be returned only if src is a file and this means it + // is in a splice syscall and the error has to be ignored. + if err == io.EOF { + return v, nil + } return nil, tcpip.ErrBadAddress } return v, nil |