Fedora Account System
Red Hat Associate
Red Hat Customer
The DNS decoders in netty-codec-dns build message records from the attacker-controlled 16-bit section counts (QDCOUNT, ANCOUNT, NSCOUNT, ARCOUNT) with no per-message record limit and no check of the counts against the message length. Each record name is decoded by DnsCodecUtil.decodeDomainName, which sizes its working StringBuilder to twice the entire remaining message buffer instead of the 255-character maximum name length. The per-name length check runs only after that allocation has been made. A single frame-legal message of about 64 KiB can therefore produce thousands of records, each with an oversized allocation, so total work grows quadratically with the frame size. A remote, unauthenticated peer can use this to cause a denial of service. In testing, one 64 KiB message materialized about 4,661 records and caused about 325 MiB of transient heap allocation, roughly 5,000 times the on-wire size, on the synchronous I/O thread. A sustained low-bandwidth flood can saturate garbage collection and stall the event loop, denying service to every connection handled by that loop. Affected are users of netty-codec-dns that decode DNS messages from untrusted peers, including DNS servers using TcpDnsQueryDecoder or DatagramDnsQueryDecoder, and DNS clients such as those using netty-resolver-dns with DnsResponseDecoder. Versions up to and including 4.1.138.Final, and 4.2.0.Final through 4.2.18.Final, are affected. The issue is fixed in 4.1.139.Final and 4.2.19.Final. Affected versions: >= 4.2.0.Final, <= 4.2.18.Final; <=4.1.138.Final Patched versions: 4.2.19.Final; 4.1.139.Final CVSS: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (7.5) CWE: CWE-400, CWE-405 Upstream advisory: https://github.com/netty/netty/security/advisories/GHSA-3h79-3wcf-5whr CVE requested by the Netty Project via PSIRTSUPT-32166.