<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Http3 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/http3/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/http3/feed.xml" rel="self" type="application/rss+xml"/><item><title>Netty HTTP/3 QPACK Literal Unbounded Allocation Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-netty-http3-qpack/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-netty-http3-qpack/</guid><description>A vulnerability in Netty's HTTP/3 QPACK decoder allows an attacker to cause a denial of service by sending a crafted HTTP/3 header that triggers excessive memory allocation, leading to a server crash.</description><content:encoded><![CDATA[<p>A vulnerability exists in Netty&rsquo;s HTTP/3 QPACK decoder (versions 4.2.12.Final and earlier) that can be exploited to cause a denial-of-service (DoS) condition. The vulnerability stems from the <code>io.netty.handler.codec.http3.QpackDecoder#decodeHuffmanEncodedLiteral</code> function, which allocates memory for HTTP/3 headers based on lengths provided in the header itself, without properly validating that the declared length corresponds to available data. A malicious actor can craft a small HTTP/3 HEADERS frame containing a QPACK section that decodes to a large non-Huffman name length, causing the server to allocate a large byte array (on the order of a gigabyte). This can exhaust server memory, leading to performance degradation or a complete crash.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker crafts an HTTP/3 HEADERS frame with a malicious QPACK section.</li>
<li>The QPACK section is designed to trigger the non-Huffman branch of <code>io.netty.handler.codec.http3.QpackDecoder#decodeHuffmanEncodedLiteral</code>.</li>
<li>The attacker sets a very large length value for a string literal within the QPACK section. The encoding allows a large length to be expressed in few bytes.</li>
<li>The Netty server receives the malicious HTTP/3 HEADERS frame.</li>
<li>The <code>QpackDecoder</code> attempts to allocate a byte array of the size specified in the malicious header using <code>new byte[length]</code>.</li>
<li>Due to the missing length validation, the server allocates a potentially gigabyte-sized byte array.</li>
<li>The server experiences high memory consumption and potential resource exhaustion.</li>
<li>The server slows down, stalls, or crashes due to the excessive memory allocation.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can lead to a denial-of-service condition, where the server becomes unresponsive or crashes. This affects applications using the vulnerable versions of <code>netty-codec-http3</code>. A single crafted HTTP/3 HEADERS frame can trigger gigabytes of memory allocation, making the server susceptible to resource exhaustion under relatively low request volumes. This can disrupt services, impacting availability and potentially leading to data loss or corruption.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a patched version of <code>netty-codec-http3</code> that addresses the vulnerability.</li>
<li>Deploy the Sigma rule below to detect attempts to exploit this vulnerability by monitoring for unusually large memory allocations associated with HTTP/3 header decoding.</li>
<li>Implement rate limiting on HTTP/3 requests to mitigate the impact of a large number of malicious requests.</li>
<li>Monitor server resource utilization (CPU, memory) for unusual spikes that may indicate exploitation attempts.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>netty</category><category>http3</category><category>qpack</category><category>denial-of-service</category><category>vulnerability</category></item></channel></rss>