mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
sockets: ignore io.EOF from view.ReadAt
Reported-by: syzbot+5466463b7604c2902875@syzkaller.appspotmail.com PiperOrigin-RevId: 337451896
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user