<?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>Rust-Zserio (&lt;= 0.5.3) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/rust-zserio--0.5.3/</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>Tue, 09 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/rust-zserio--0.5.3/feed.xml" rel="self" type="application/rss+xml"/><item><title>rust-zserio Unbounded Memory Allocation Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-rust-zserio-memory-allocation/</link><pubDate>Tue, 09 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-rust-zserio-memory-allocation/</guid><description>The rust-zserio package is vulnerable to unbounded memory allocation when deserializing arrays, strings, or bytes (blob) types, allowing an attacker to cause a denial-of-service by providing a crafted data file with a large size value.</description><content:encoded><![CDATA[<p>The rust-zserio package, versions 0.5.3 and earlier, is susceptible to an unbounded memory allocation vulnerability. This flaw arises during the deserialization of arrays, strings, or byte (blob) types. The library reads the size of the incoming data from the serialized input itself, and subsequently allocates memory based on this size. Due to the absence of proper size validation, a malicious actor can exploit this by crafting a data file containing an excessively large size value. This would force the rust-zserio runtime to allocate a substantial amount of memory, potentially leading to a denial-of-service condition. This vulnerability poses a significant risk to applications that process zserio-encoded messages from untrusted sources, as it can be triggered remotely through a specially crafted input.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious zserio-encoded data file.</li>
<li>The malicious data file contains a manipulated size value for an array, string, or blob field. This size value is set to an extremely large number.</li>
<li>The vulnerable rust-zserio library attempts to deserialize the data file.</li>
<li>During deserialization, the library reads the manipulated size value from the data file.</li>
<li>The library attempts to allocate memory based on the excessively large size value.</li>
<li>The excessive memory allocation consumes available system resources.</li>
<li>The application becomes unresponsive due to resource exhaustion.</li>
<li>The system experiences a denial-of-service, impacting availability.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability leads to a denial-of-service condition. Affected applications become unresponsive, potentially disrupting critical services. The number of victims depends on the prevalence of rust-zserio in systems that process untrusted data. The impact is significant, as it can lead to service outages and potentially impact other applications running on the same system due to resource exhaustion.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the patch from commit <a href="https://github.com/Danaozhong/rust-zserio/commit/57f5fb4a2a8611d58dbcc1a9221349206dd99c3c">57f5fb</a> to remediate the unbounded memory allocation vulnerability.</li>
<li>Implement input validation to check the size of arrays, strings, or blob types before memory allocation.</li>
<li>Monitor resource consumption of rust-zserio applications to detect abnormal memory allocation patterns. Deploy the &ldquo;Detect Excessive Memory Allocation by rust-zserio&rdquo; Sigma rule to identify potential exploitation attempts.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>denial-of-service</category><category>memory-allocation</category></item></channel></rss>