Returns ENOBUFS when writing to a veth device whose buffer is full.

A task is stuck when it keeps sendMsg w/o any recvMsg  until  the number of
message exceeds the buffer limit. The change also significantly bumps the
limit from 64 to 1000 for a larger buffer.

Reported-by: syzbot+8788f5c1ba95e12ab07d@syzkaller.appspotmail.com
Reported-by: syzbot+67759fceac0c30ece991@syzkaller.appspotmail.com
PiperOrigin-RevId: 704904404
This commit is contained in:
Jing Chen
2024-12-10 17:35:54 -08:00
committed by gVisor bot
parent d9fa8c2e8a
commit c88ffa321e
5 changed files with 74 additions and 14 deletions
+1 -1
View File
@@ -298,7 +298,7 @@ func (s *Stack) newVeth(ctx context.Context, linkAttrs map[uint16]nlmsg.BytesVie
}
}
}
ep, peerEP := veth.NewPair(defaultMTU)
ep, peerEP := veth.NewPair(defaultMTU, veth.DefaultBacklogSize)
id := s.Stack.NextNICID()
peerID := peerStack.Stack.NextNICID()
if ifname == "" {