В ядре Linux была устранена следующая уязвимость: io_uring/net: не переупотребляйте буферы при использовании MSG_TRUNC When с MSG_TRUNC выдается recv/recvmsg и входящий пакет больше, чем предоставленный буфер, чистый слой возвращает полную длину пакета, а не количество байтов, фактически скопированных в буфер. В результате io_uring продвигает больше предоставленного буферного кольца, чем было фактически заполнено. Используйте фактический размер заполненного региона, чтобы потреблять буфер, но возвращайте полный размер, чтобы сохранить семантику MSG_TRUNC.
Будьте осторожны с multishot, потому что это, кажется, уже сокращает потребление на основе доступного размера полезной нагрузки. Об этом сообщается в https://github.com/axboe/liburing/issues/1619. [axboe: fold в size_t без подписи исправить]
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: io_uring/net: don't overconsume buffers when using MSG_TRUNC When a recv/recvmsg is issued with MSG_TRUNC and the incoming packet is larger than the provided buffer, the net layer returns the full length of the packet rather than the number of bytes actually copied into the buffer. As a result, io_uring advances more of the provided buffer ring than was actually filled. Use the actual filled region size to consume the buffer, but still return the full size to preserve MSG_TRUNC semantics. Take care with multishot, because that seems to already truncate the consumption based on the available payload size. This was reported in https://github.com/axboe/liburing/issues/1619. [axboe: fold in size_t unsigned fix]