quinn is a popular QUIC implementation in Rust. I reported two denial-of-service bugs to the maintainers, both are fixed. One lives in the UDP layer below QUIC, the other in how quinn handles a peer's transport parameters.
1. recv_single() spins after a truncated datagram
GHSA-6pp4-4cxf-xf88 · High · quinn-udp, fixed in 0.5.16 and 0.6.3
recv_single is the Unix fallback that receives one datagram per recvmsg call. It is used on OpenBSD and some other Unix and Apple configurations. The normal Linux batched path and Windows use different code.
Two details combined into a loop:
The code checked the MSG_TRUNC flag before checking whether recvmsg had failed.
The msghdr was initialized only once, so its flags survived from one call to the next.
So after a datagram that was too big for the buffer, the next call returned EAGAIN , but the old MSG_TRUNC flag was still set. The code treated that as "another truncated datagram, discard and try again" instead of returning WouldBlock .…