Распределение ресурсов без ограничений. Уязвимость в Cowlib ninenines позволяет неаутентифицированному удаленному узлу HTTP/2 или HTTP/3 исчерпать память на уязвимом сервере (или клиенте) и вызвать отказ в обслуживании. Декодер префиксных целых чисел HPACK и QPACK корова_hpack_common:dec_big_int/3 в src/cow_hpack_common.hrl (вызывается из коровы_hpack:decode/2 в src/cow_hpack.erl и из коровы_qpack:decode_field_section/3 в src/cow_qpack.erl) считывает октеты продолжения, пока не встретит тот, чей старший бит ясно, оценивая Int + (Значение bsl M) на каждом шаге со сдвигом M, увеличивающимся на семь на октет.
Никаких ограничений на количество октетов продолжения, на результирующую разрядность или на значение не налагается; декодер использует любую закодированную длину, предоставленную партнером. Поскольку целые числа Эрланга неизменяемы, каждое промежуточное значение bsl M и каждое обновление аккумулятора выделяют новое большое число, ширина разряда которого растет линейно с количеством обработанных октетов. Суммируя по всему декодированию, материализация временной большой цифры имеет порядок квадрата закодированной длины.
Единственное максимальное индексированное представление HPACK, содержащееся в одном HTTP/2 HEADERS плюс один кадр CONTINUATION с значением max_frame_size_received по умолчанию для Cowboy, может вызвать сотни мегабайт временного распределения и сбора мусора, прежде чем результирующий индекс таблицы заголовков будет отклонен как недействительный. Повторяющиеся или одновременные подключения увеличивают нагрузку и могут привести к исчерпанию памяти Erlang VM. Cowlib — это анализатор HTTP, используемый Cowboy, плагином управления RabbitMQ и другими серверами и клиентами Erlang и Elixir HTTP/2 и HTTP/3, поэтому любая открытая конечная точка, которая принимает HPACK или QPACK от ненадежного узла, доступна.
Эта проблема затрагивает Cowlib: от 2.0.0 до 2.19.0.
Показать оригинальное описание (EN)
Allocation of resources without limits vulnerability in ninenines cowlib allows an unauthenticated remote HTTP/2 or HTTP/3 peer to exhaust memory on the vulnerable server (or client) and cause a denial of service. The HPACK and QPACK prefixed-integer decoder cow_hpack_common:dec_big_int/3 in src/cow_hpack_common.hrl (invoked from cow_hpack:decode/2 in src/cow_hpack.erl and from cow_qpack:decode_field_section/3 in src/cow_qpack.erl) reads continuation octets until it sees one whose high bit is clear, evaluating Int + (Value bsl M) at each step with the shift M growing by seven per octet. No limit is enforced on the number of continuation octets, on the resulting bit width, or on the value; the decoder consumes whatever encoded length the peer supplies. Because Erlang integers are immutable, each intermediate Value bsl M and each accumulator update allocates a fresh bignum whose digit width grows linearly with the number of octets processed so far. Summed across the whole decode, the transient bignum digit materialization is on the order of the square of the encoded length. A single maximal HPACK indexed representation carried inside one HTTP/2 HEADERS plus one CONTINUATION frame at Cowboy's default max_frame_size_received can force hundreds of megabytes of transient allocation and garbage-collection churn before the resulting header-table index is rejected as invalid. Repeated or concurrent connections multiply the pressure and can drive the Erlang VM to memory exhaustion. Cowlib is the HTTP parser used by Cowboy, RabbitMQ's management plugin, and other Erlang and Elixir HTTP/2 and HTTP/3 servers and clients, so any exposed endpoint that accepts HPACK or QPACK from an untrusted peer is reachable. This issue affects cowlib: from 2.0.0-pre.1 before 2.19.0.
Характеристики атаки
Последствия
Строка CVSS v4.0