<?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 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/rust/</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>Thu, 23 Apr 2026 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/rust/feed.xml" rel="self" type="application/rss+xml"/><item><title>rust-openssl Unchecked Callback Length Memory Leak</title><link>https://feed.craftedsignal.io/briefs/2026-04-rust-openssl-memory-leak/</link><pubDate>Thu, 23 Apr 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-rust-openssl-memory-leak/</guid><description>The rust-openssl crate versions 0.9.24 prior to 0.10.78 are vulnerable to memory leaks due to unchecked callback lengths in PSK/cookie trampolines, potentially leading to buffer overflows.</description><content:encoded><![CDATA[<p>The <code>rust-openssl</code> crate, a Rust wrapper for the OpenSSL library, is susceptible to a high-severity vulnerability due to unchecked callback lengths within the FFI trampolines used by several functions related to PSK (Pre-Shared Key) and cookie generation. Specifically, versions 0.9.24 up to (but not including) 0.10.78 are affected. The vulnerable functions include <code>SslContextBuilder::set_psk_client_callback</code>, <code>set_psk_server_callback</code>, <code>set_cookie_generate_cb</code>, and <code>set_stateless_cookie_generate_cb</code>. The issue arises because the user-provided closure&rsquo;s returned <code>usize</code> (size) value is directly passed to OpenSSL without validation against the size of the <code>&amp;mut [u8]</code> buffer provided to the closure, resulting in potential buffer overflows and memory leaks. This allows an attacker to potentially leak adjacent memory regions to a peer.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious application or exploits an existing application using the vulnerable <code>rust-openssl</code> crate.</li>
<li>The attacker triggers one of the vulnerable callback functions (<code>set_psk_client_callback</code>, <code>set_psk_server_callback</code>, <code>set_cookie_generate_cb</code>, or <code>set_stateless_cookie_generate_cb</code>).</li>
<li>The vulnerable callback function executes the user-provided closure.</li>
<li>The user-provided closure returns a <code>usize</code> value indicating the intended length of the data to be written to the output buffer.</li>
<li>The FFI trampoline forwards this <code>usize</code> value directly to OpenSSL, bypassing bounds checking against the actual buffer size.</li>
<li>If the returned <code>usize</code> exceeds the allocated buffer size, OpenSSL writes beyond the buffer boundary, leading to a buffer overflow.</li>
<li>The buffer overflow allows the attacker to read adjacent memory regions or overwrite data, potentially leaking sensitive information or corrupting program state.</li>
<li>Successful exploitation could lead to information disclosure, denial of service, or potentially arbitrary code execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability could lead to information disclosure, denial of service, or potentially arbitrary code execution. Given the widespread use of the <code>rust-openssl</code> crate in various applications, the impact could be significant, affecting numerous services and potentially exposing sensitive data. The vulnerability allows for memory leakage to peers which could have broad consequences.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to <code>rust-openssl</code> version 0.10.78 or later to patch the vulnerability (reference: <a href="https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78)">https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78)</a>.</li>
<li>Implement input validation and sanitization within user-provided closures to ensure that the returned <code>usize</code> value does not exceed the allocated buffer size, mitigating the risk even in vulnerable versions.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>rust</category><category>openssl</category><category>memory leak</category><category>buffer overflow</category></item><item><title>russh Keyboard-Interactive Authentication Denial-of-Service</title><link>https://feed.craftedsignal.io/briefs/2024-07-03-russh-dos/</link><pubDate>Wed, 03 Jul 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-07-03-russh-dos/</guid><description>A denial-of-service vulnerability exists in the russh crate, where a malicious client can crash any russh-based server implementing keyboard-interactive authentication by sending a crafted SSH_MSG_USERAUTH_INFO_RESPONSE message with a large response count, leading to excessive memory allocation and an out-of-memory crash without requiring any credentials.</description><content:encoded><![CDATA[<p>A pre-authentication denial-of-service vulnerability exists in the russh crate, specifically affecting servers that implement keyboard-interactive authentication. This vulnerability allows a malicious client to crash a russh-based server by sending a malformed packet, without needing any valid credentials. The vulnerability resides in the <code>read_userauth_info_response</code> function within <code>russh/src/server/encrypted.rs</code>, where an unbounded <code>u32</code> count from the client&rsquo;s <code>SSH_MSG_USERAUTH_INFO_RESPONSE</code> message is used directly to allocate memory via <code>Vec::with_capacity()</code>. An attacker can exploit this by sending a large value for &rsquo;n&rsquo; (e.g., 0x10000000), leading to a massive memory allocation attempt and subsequent out-of-memory crash. This affects servers using keyboard-interactive for multi-step authentication such as TOTP or 2FA. The vulnerability exists in russh versions prior to 0.60.1.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker establishes a TCP connection to the russh server.</li>
<li>The attacker performs the initial SSH key exchange (anonymous DH handshake).</li>
<li>The attacker sends a <code>USERAUTH_REQUEST</code> message with the authentication method set to <code>keyboard-interactive</code>.</li>
<li>The server responds with <code>Auth::Partial</code>, indicating that keyboard-interactive authentication is in progress and prompts are required.</li>
<li>The attacker sends a <code>USERAUTH_INFO_RESPONSE</code> message with a crafted <code>u32</code> value for &rsquo;n&rsquo; set to a large number, such as 0x10000000 (268435456), indicating the number of responses.</li>
<li>The attacker intentionally does not include any response data in the <code>USERAUTH_INFO_RESPONSE</code> message, to maximize the memory allocation attempt.</li>
<li>The server attempts to allocate memory using <code>Vec::with_capacity(n)</code>, where n is the attacker-controlled large value, triggering excessive memory allocation.</li>
<li>The server exhausts available memory, leading to an out-of-memory (OOM) condition, and the server process crashes, causing a denial of service.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>A successful attack results in a denial of service, crashing the russh server and affecting all active SSH sessions. Because the attack occurs before authentication, it can be executed repeatedly and quickly, preventing legitimate users from accessing the server. This can disrupt services relying on the SSH server, leading to downtime and potential data loss. An end-to-end Proof of Concept demonstrates that a russh server within a container with a 512MB memory limit can be OOM-killed by this vulnerability.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to russh version 0.60.1 or later to incorporate the fix that limits the <code>Vec::with_capacity</code> allocation based on the remaining packet data.</li>
<li>Monitor network traffic for SSH <code>USERAUTH_INFO_RESPONSE</code> messages with unusually large response counts using the provided Sigma rule &ldquo;Detect Excessive SSH Keyboard-Interactive Responses&rdquo;.</li>
<li>Implement rate limiting or connection limits to mitigate the impact of rapid connection attempts from malicious clients.</li>
<li>Review and audit implementations of <code>Handler::auth_keyboard_interactive</code> to ensure proper input validation and resource management, especially where <code>Auth::Partial</code> is returned.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>denial-of-service</category><category>russh</category><category>keyboard-interactive</category></item><item><title>rustls-webpki Denial-of-Service Vulnerability via Malformed CRL BIT STRING</title><link>https://feed.craftedsignal.io/briefs/2024-01-rustls-webpki-dos/</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-rustls-webpki-dos/</guid><description>A denial-of-service vulnerability exists in rustls-webpki versions prior to 0.103.13 and between 0.104.0-alpha.1 and 0.104.0-alpha.7 due to a panic in `bit_string_flags()` when processing a malformed CRL BIT STRING, triggered when CRL checking is enabled and an attacker provides a crafted CRL.</description><content:encoded><![CDATA[<p>A denial-of-service vulnerability has been identified in the rustls-webpki crate, specifically affecting versions prior to 0.103.13 and versions between 0.104.0-alpha.1 and 0.104.0-alpha.7. The vulnerability stems from a panic within the <code>bit_string_flags()</code> function located in <code>src/der.rs</code>. This panic occurs when the function processes a malformed Certificate Revocation List (CRL) containing a BIT STRING with a content of exactly <code>[0x00]</code>. The issue is triggered via the <code>issuingDistributionPoint</code> CRL extension when CRL revocation checking is explicitly enabled through <code>RevocationOptions</code> and the application loads CRL data from a source controlled by an attacker. This vulnerability allows a remote attacker to cause a denial of service in applications that rely on rustls-webpki for certificate validation.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker obtains a certificate from a Certificate Authority (CA) that permits custom Certificate Distribution Point (CDP) URLs.</li>
<li>Attacker sets the CDP of the certificate to point to a server they control (e.g., <code>cdp</code>).</li>
<li>The attacker crafts a malicious CRL with a BIT STRING in the <code>issuingDistributionPoint</code> extension containing the byte sequence <code>0x00</code>, triggering the vulnerability in <code>bit_string_flags()</code>. The CRL must be DER encoded and contain the following ASN.1 structure: <code>a0 10 30 0e 30 0c 06 03 55 1d 1c 04 05 30 03 83 01 00</code></li>
<li>The attacker hosts the crafted CRL on the server specified in the CDP.</li>
<li>A vulnerable mTLS server configured to use CRL checking receives a connection request from a client presenting the attacker&rsquo;s certificate.</li>
<li>The mTLS server fetches the CRL from the attacker-controlled CDP server during the TLS handshake.</li>
<li>The <code>BorrowedCertRevocationList::from_der()</code> function parses the CRL, leading to the execution of <code>bit_string_flags()</code> on the malformed BIT STRING.</li>
<li>The <code>bit_string_flags()</code> function panics due to an index-out-of-bounds error, resulting in a denial-of-service condition on the mTLS server.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability leads to a denial-of-service condition. Affected applications that perform mTLS, particularly servers, become unavailable when processing connections from clients presenting certificates with malicious CRL distribution points. This can disrupt services and impact availability. The severity is high because an attacker can trigger the vulnerability remotely without authentication.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to rustls-webpki version 0.103.13 or 0.104.0-alpha.7 or later to patch the vulnerability.</li>
<li>Deploy the Sigma rule <code>Detect-Malformed-CRL-Bit-String</code> to identify attempts to exploit this vulnerability by monitoring for specific byte sequences in CRL data.</li>
<li>Implement strict validation and sanitization of CRL data before processing it with <code>rustls-webpki</code>, especially when fetching CRLs from untrusted sources.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>denial-of-service</category><category>rustls-webpki</category><category>crl</category></item></channel></rss>