mirror of
https://github.com/rustsec/advisory-db.git
synced 2026-11-30 16:44:31 -06:00
1780 lines
70 KiB
XML
1780 lines
70 KiB
XML
<?xml version="1.0"?>
|
||
<feed xmlns="http://www.w3.org/2005/Atom"><title>RustSec Advisories</title><id>https://rustsec.org/feed.xml</id><updated>2025-01-22T12:00:00+00:00</updated><author><name>RustSec</name></author><icon>https://rustsec.org/favicon.ico</icon><link href="https://rustsec.org/feed.xml" rel="self" type="application/atom+xml"/><link href="https://rustsec.org/" rel="alternate" type="text/html"/><subtitle xml:lang="en">Security advisories filed against Rust crates</subtitle><entry><title>RUSTSEC-2024-0434: Security notice about matrix-sdk-crypto</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0434.html</id><updated>2025-01-22T12:00:00+00:00</updated><category term="crypto-failure"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0434.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0434: Security notice about matrix-sdk-crypto"/><published>2025-01-22T12:00:00+00:00</published><summary xml:lang="en"> Missing facility to signal rotation of a verified cryptographic identity</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/matrix-sdk-crypto/RUSTSEC-2024-0434.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/matrix-sdk-crypto/RUSTSEC-2024-0434.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0434">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2024-0434
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>Missing facility to signal rotation of a verified cryptographic identity</p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2024-01-07">
|
||
January 7, 2024
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2025-01-22">
|
||
January 22, 2025
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/matrix-sdk-crypto.html">matrix-sdk-crypto</a>
|
||
(<a href="https://crates.io/crates/matrix-sdk-crypto">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
<span class="tag info">INFO</span>
|
||
Notice
|
||
|
||
</dd>
|
||
|
||
|
||
<dt id="categories">Categories</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><a href="/categories/crypto-failure.html">crypto-failure</a></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="aliases">Aliases</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
|
||
<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-52813">CVE-2024-52813</a>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<a href="https://github.com/advisories/GHSA-r5vf-wf4h-82gg">GHSA-r5vf-wf4h-82gg</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-r5vf-wf4h-82gg">
|
||
https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-r5vf-wf4h-82gg
|
||
</a>
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.8.0</code></li>
|
||
|
||
</ul>
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<p>Versions of the matrix-sdk-crypto Rust crate before 0.8.0 lack a dedicated
|
||
mechanism to notify that a user's cryptographic identity has changed from a
|
||
verified to an unverified one, which could cause client applications relying on
|
||
the SDK to overlook such changes.</p>
|
||
<p>matrix-sdk-crypto 0.8.0 adds a new <code>VerificationLevel::VerificationViolation</code>
|
||
enum variant which indicates that a previously verified identity has been
|
||
changed.</p>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry><entry><title>RUSTSEC-2025-0001: Vulnerability in gix-worktree-state</title><id>https://rustsec.org/advisories/RUSTSEC-2025-0001.html</id><updated>2025-01-22T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2025-0001.html" rel="alternate" type="text/html" title="RUSTSEC-2025-0001: Vulnerability in gix-worktree-state"/><published>2025-01-18T12:00:00+00:00</published><summary xml:lang="en">gix-worktree-state nonexclusive checkout sets executable files world-writable</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/gix-worktree-state/RUSTSEC-2025-0001.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/gix-worktree-state/RUSTSEC-2025-0001.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2025-0001">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2025-0001
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>gix-worktree-state nonexclusive checkout sets executable files world-writable</p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2025-01-18">
|
||
January 18, 2025
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2025-01-18">
|
||
January 18, 2025
|
||
</time>
|
||
|
||
<time datetime="2025-01-22">
|
||
(last modified: January 22, 2025)
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/gix-worktree-state.html">gix-worktree-state</a>
|
||
(<a href="https://crates.io/crates/gix-worktree-state">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
Vulnerability
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
<dt id="keywords">Keywords</dt>
|
||
<dd>
|
||
|
||
<a href="/keywords/permissions.html">#permissions</a>
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
<dt id="aliases">Aliases</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
|
||
<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-22620">CVE-2025-22620</a>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<a href="https://github.com/advisories/GHSA-fqmf-w4xh-33rh">GHSA-fqmf-w4xh-33rh</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-fqmf-w4xh-33rh">
|
||
https://github.com/GitoxideLabs/gitoxide/security/advisories/GHSA-fqmf-w4xh-33rh
|
||
</a>
|
||
</li>
|
||
|
||
|
||
<li>
|
||
<a href="https://github.com/advisories/GHSA-fqmf-w4xh-33rh">
|
||
https://github.com/advisories/GHSA-fqmf-w4xh-33rh
|
||
</a>
|
||
</li>
|
||
|
||
<li>
|
||
<a href="https://nvd.nist.gov/vuln/detail/CVE-2025-22620">
|
||
https://nvd.nist.gov/vuln/detail/CVE-2025-22620
|
||
</a>
|
||
</li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="cvss_score">CVSS Score</dt>
|
||
<dd>5 <span class="tag medium">
|
||
MEDIUM
|
||
</span></dd>
|
||
|
||
<dt id="cvss_details">CVSS Details</dt>
|
||
<dd>
|
||
<dl>
|
||
|
||
<dt>Attack vector</dt><dd>Local</dd>
|
||
|
||
|
||
|
||
<dt>Attack complexity</dt><dd>Low</d>
|
||
|
||
|
||
|
||
<dt>Privileges required</dt><dd>Low</dd>
|
||
|
||
|
||
|
||
<dt>User interaction</dt><dd>Required</dd>
|
||
|
||
|
||
|
||
<dt>Scope</dt><dd>Unchanged</dd>
|
||
|
||
|
||
|
||
<dt>Confidentiality</dt><dd>None</dd>
|
||
|
||
|
||
|
||
<dt>Integrity</dt><dd>High</dd>
|
||
|
||
|
||
|
||
<dt>Availability</dt><dd>None</dd>
|
||
|
||
</dl>
|
||
</dd>
|
||
|
||
<dt id="cvss">CVSS Vector</dt>
|
||
<dd><a href="https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N">CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N</a></dd>
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.17.0</code></li>
|
||
|
||
</ul>
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt>Affected Functions</dt>
|
||
<dd>Version</dd>
|
||
|
||
<dt><code>gix_worktree_state::checkout</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&lt;0.17.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<h3>Summary</h3>
|
||
<p><code>gix-worktree-state</code> specifies 0777 permissions when checking out executable files, intending that the umask will restrict them appropriately. But one of the strategies it uses to set permissions is not subject to the umask. This causes files in a repository to be world-writable in some situations.</p>
|
||
<h3>Details</h3>
|
||
<p>Git repositories track executable bits for regular files. In tree objects and the index, regular file modes are stored as 0644 if not executable, or 0755 if executable. But this is independent of how the permissions are set in the filesystem (where supported).</p>
|
||
<p><a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/function.rs#L8-L35"><code>gix_worktree_state::checkout</code></a> has two strategies for checking out a file and marking it executable on a Unix-like operating system, one of which is vulnerable:</p>
|
||
<ul>
|
||
<li>If the file is created by assuming it does not already exist, correct permissions are applied, because permissions specified when opening a file are subject to the umask.</li>
|
||
<li>If the file is considered possibly already to exist—even in a clean checkout if the application does not specify the option to treat the destination directory as empty—then permissions conferring unrestricted access to any user account on the system are wrongly applied, because permissions specified when calling chmod on an existing file are not subject to the umask. </li>
|
||
</ul>
|
||
<p>Specifically, <a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/entry.rs#L56-L191"><code>checkout::entry::checkout</code></a> chooses the strategy for each file. The same strategy is usually chosen for each executable file, if no <a href="https://github.com/git/git/blob/a60673e9252b08d4eca90543b3729f4798b9aafd/Documentation/RelNotes/2.11.0.txt#L149-L154">process</a> (i.e. <a href="https://github.com/GitoxideLabs/gitoxide/discussions/996">long running</a>) smudge filter is in use. The strategy depends on the <a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/mod.rs#L50-L53"><code>checkout::Options::destination_is_initially_empty</code></a> value, which is passed along to <a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/entry.rs#L253-L277"><code>checkout::entry::open_file</code></a>, whose return value includes a flag indicating whether permissions still need to be set:</p>
|
||
<ul>
|
||
<li>
|
||
<p>With <code>destination_is_initially_empty: true</code>, executable permissions are specified when opening the file, via <a href="https://doc.rust-lang.org/std/os/unix/fs/trait.OpenOptionsExt.html#tymethod.mode"><code>OpenOptionsEx::mode</code></a>, by its effect on the behavior of <a href="https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.open"><code>OpenOptions::open</code></a>. A mode of 0777 is safe here, for the same reason the default mode of 0666 is safe. When creating a file, the applied mode is the specified mode with any bits unset from it that are set in the umask.</p>
|
||
<p><a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/entry.rs#L265-L268">https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/entry.rs#L265-L268</a></p>
|
||
<p>The <code>set_executable_after_creation</code> flag in the <code>open_file</code> return value is then <code>false</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p>With <code>destination_is_initially_empty: false</code>, executable permissions are set in a separate step, via <a href="https://doc.rust-lang.org/beta/std/os/unix/fs/trait.PermissionsExt.html#tymethod.set_mode"><code>PermissionsExt::set_mode</code></a> and <a href="https://doc.rust-lang.org/beta/std/fs/fn.set_permissions.html"><code>set_permissions</code></a>. A mode of 0777 is not safe here, because the umask is not applied. The vulnerable code appears in <a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/entry.rs#L279-L299"><code>checkout::entry::finalize_entry</code></a>, which receives the <code>set_executable_after_creation</code> flag originally from <code>open_file</code>:</p>
|
||
<p><a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/entry.rs#L288-L293">https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/entry.rs#L288-L293</a></p>
|
||
<p>The file has unrestricted permissions.</p>
|
||
</li>
|
||
</ul>
|
||
<p><code>finalize_entry</code> is <a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/chunk.rs#L229-L236">likewise called</a> from <a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/chunk.rs#L157-L259"><code>checkout::chunk::process_delayed_filter_results</code></a>.</p>
|
||
<h3>PoC</h3>
|
||
<ol>
|
||
<li>
|
||
<p>On a Unix-like system such as GNU/Linux or macOS, create a new project and define its dependencies. While the vulnerability is in <code>gix-worktree-state</code>, this example will use vulnerable code through the <code>gix</code> crate, which exposes it. Run:</p>
|
||
<pre><code class="language-sh">cargo new checkout-index
|
||
cd checkout-index
|
||
cargo add gix gix-object
|
||
</code></pre>
|
||
</li>
|
||
<li>
|
||
<p>In the <code>checkout-index</code> directory, edit <code>src/main.rs</code> so that its entire contents are:</p>
|
||
<pre><code class="language-rust">fn main() -&gt; Result&lt;(), Box&lt;dyn std::error::Error&gt;&gt; {
|
||
let repo = gix::discover(&quot;has-executable&quot;)?;
|
||
let mut index = repo.open_index()?;
|
||
gix::worktree::state::checkout(
|
||
&amp;mut index,
|
||
repo.work_dir().ok_or(&quot;need non-bare repo&quot;)?,
|
||
gix_object::find::Never, // Can also use: repo.objects.clone()
|
||
&amp;gix::progress::Discard,
|
||
&amp;gix::progress::Discard,
|
||
&amp;Default::default(),
|
||
Default::default(),
|
||
)?;
|
||
Ok(())
|
||
}
|
||
</code></pre>
|
||
</li>
|
||
<li>
|
||
<p>Create the test repository that the vulnerable program will operate on. Still in the <code>checkout-index</code> directory, run:</p>
|
||
<pre><code class="language-sh">git init has-executable
|
||
touch has-executable/a has-executable/b
|
||
chmod +x has-executable/b
|
||
git -C has-executable add .
|
||
</code></pre>
|
||
<p>It is not necessary to commit the changes, only to stage them, since the test program will check out the index.</p>
|
||
</li>
|
||
<li>
|
||
<p><em>Optionally</em>, run <code>rm has-executable/[ab]</code> to remove the staged files from disk.</p>
|
||
</li>
|
||
<li>
|
||
<p>Run the program by issuing <code>cargo run</code>. The program uses <code>gix-worktree-state</code> to check out the index. It should terminate successfully and not issue any errors.</p>
|
||
</li>
|
||
<li>
|
||
<p>Run <code>ls -l has-executable</code> to inspect the permissions of the checked out files. Observe that owner, group, and other all have read, write, and execute permissions on <code>b</code>.</p>
|
||
<pre><code class="language-text">-rw-r--r-- 1 ek ek 0 Jan 9 03:38 a
|
||
-rwxrwxrwx 1 ek ek 0 Jan 9 03:38 b
|
||
</code></pre>
|
||
<p>With affected versions of <code>gix-worktree-state</code>, the output shows <code>-rwxrwxrwx</code> for <code>b</code>, whether the files were removed in step 4 or not.</p>
|
||
</li>
|
||
<li>
|
||
<p>It was not necessary to set <code>destination_is_initially_empty</code> to <code>false</code> explicitly to trigger the bug, because that is its default value. If desired, modify the program to pass <code>true</code> and rerun the experiment to verify that <code>b</code> is no longer created with excessive permissions. The modified program would change the last <code>checkout</code> argument from <code>Default::default(),</code> to:</p>
|
||
<pre><code class="language-rust"> gix::worktree::state::checkout::Options {
|
||
destination_is_initially_empty: true,
|
||
..Default::default()
|
||
},
|
||
</code></pre>
|
||
</li>
|
||
</ol>
|
||
<h3>Impact</h3>
|
||
<p>Setting unlimited file permissions is a problem on systems where a user account exists on the system that should not have the ability to access and modify the files. That applies to multi-user systems, or when an account is used to run software with reduced abilities. (Some programs may also treat broad write permissions to mean less validation is required.)</p>
|
||
<p>This bug affects Unix-like systems but not Windows. The <code>gix clone</code> command is not believed to be affected, due to <a href="https://github.com/GitoxideLabs/gitoxide/blob/af704f57bb9480c47cdd393465264d586f1d4562/gitoxide-core/src/index/checkout.rs#L14-L172"><code>checkout_exclusive</code></a>'s <a href="https://github.com/GitoxideLabs/gitoxide/blob/af704f57bb9480c47cdd393465264d586f1d4562/gitoxide-core/src/index/checkout.rs#L61">use</a> of <code>destination_is_initially_empty: true</code>. Specialized uses in which repositories are known never to have any files marked executable are unaffected. Repositories that no untrusted users can access, due to not having the ability to traverse the directories to them or due to sufficiently restrictive ACLs, are likewise unaffected.</p>
|
||
<p>The default value of <code>destination_is_initially_empty</code> is <code>false</code>, so some applications may be affected even if they don't attempt checkouts in nonempty directories. The 0777 permissions are applied to files that are created earlier in the same checkout, as well as those that already existed, regardless of their prior permissions. On preexisting files, 0777 is set <em>even if <a href="https://github.com/GitoxideLabs/gitoxide/blob/8d84818240d44e1f5fe78a231b5d9bffd0283918/gix-worktree-state/src/checkout/mod.rs#L54-L58"><code>overwrite_existing</code></a> is <code>false</code></em>, as that prevents the checkout from changing file contents but not permissions.</p>
|
||
<p>Files not tracked/staged as executable are not checked out with insecure permissions. Such a file that previously existed keeps its old permissions. However, this may include executable permissions that no longer match repository metadata, as well as undesired write permissions acquired from a previous vulnerable checkout. <code>set_mode(0o777)</code> clears other bits, so the bug is not exacerbated by the presence of setuid/setgid bits. In some applications, the vulnerable strategy may be used only for files rewritten by a <a href="https://git-scm.com/docs/gitattributes/2.40.0#_long_running_filter_process">long running</a> smudge filter or only in the presence of <a href="https://git-scm.com/docs/gitattributes/2.40.0#_delay">delays</a>.</p>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry><entry><title>RUSTSEC-2024-0432: Vulnerability in rage</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0432.html</id><updated>2025-01-03T12:00:00+00:00</updated><category term="code-execution"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0432.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0432: Vulnerability in rage"/><published>2025-01-03T12:00:00+00:00</published><summary xml:lang="en">Malicious plugin names, recipients, or identities can cause arbitrary binary execution</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/rage/RUSTSEC-2024-0432.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/rage/RUSTSEC-2024-0432.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0432">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2024-0432
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>Malicious plugin names, recipients, or identities can cause arbitrary binary execution</p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2024-12-18">
|
||
December 18, 2024
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2025-01-03">
|
||
January 3, 2025
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/rage.html">rage</a>
|
||
(<a href="https://crates.io/crates/rage">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
Vulnerability
|
||
|
||
</dd>
|
||
|
||
|
||
<dt id="categories">Categories</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><a href="/categories/code-execution.html">code-execution</a></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="aliases">Aliases</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
|
||
<a href="https://github.com/advisories/GHSA-4fg7-vxc8-qx5w">GHSA-4fg7-vxc8-qx5w</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/str4d/rage/security/advisories/GHSA-4fg7-vxc8-qx5w">
|
||
https://github.com/str4d/rage/security/advisories/GHSA-4fg7-vxc8-qx5w
|
||
</a>
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt id="related">Related</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
|
||
<a href="https://github.com/advisories/GHSA-32gq-x56h-299c">GHSA-32gq-x56h-299c</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.6.1, &lt;0.7.0</code></li>
|
||
|
||
<li><code>&gt;=0.7.2, &lt;0.8.0</code></li>
|
||
|
||
<li><code>&gt;=0.8.2, &lt;0.9.0</code></li>
|
||
|
||
<li><code>&gt;=0.9.3, &lt;0.10.0</code></li>
|
||
|
||
<li><code>&gt;=0.10.1, &lt;0.11.0</code></li>
|
||
|
||
<li><code>&gt;=0.11.1</code></li>
|
||
|
||
</ul>
|
||
|
||
</dd>
|
||
|
||
|
||
<dt id="unaffected">Unaffected</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&lt;0.6.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<p>A plugin name containing a path separator may allow an attacker to execute an arbitrary
|
||
binary.</p>
|
||
<p>Such a plugin name can be provided to the <code>rage</code> CLI through an attacker-controlled
|
||
recipient or identity string, or an attacker-controlled plugin name via the <code>-j</code> flag.</p>
|
||
<p>On UNIX systems, a directory matching <code>age-plugin-*</code> needs to exist in the working
|
||
directory for the attack to succeed.</p>
|
||
<p>The binary is executed with a single flag, either <code>--age-plugin=recipient-v1</code> or
|
||
<code>--age-plugin=identity-v1</code>. The standard input includes the recipient or identity string,
|
||
and the random file key (if encrypting) or the header of the file (if decrypting). The
|
||
format is constrained by the <a href="https://c2sp.org/age-plugin">age-plugin</a> protocol.</p>
|
||
<p>An equivalent issue was fixed in <a href="https://github.com/FiloSottile/age">the reference Go implementation of age</a>,
|
||
see advisory <a href="https://github.com/FiloSottile/age/security/advisories/GHSA-32gq-x56h-299c">GHSA-32gq-x56h-299c</a>.</p>
|
||
<p>Thanks to ⬡-49016 for reporting this issue.</p>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry><entry><title>RUSTSEC-2024-0433: Vulnerability in age</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0433.html</id><updated>2025-01-03T12:00:00+00:00</updated><category term="code-execution"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0433.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0433: Vulnerability in age"/><published>2025-01-03T12:00:00+00:00</published><summary xml:lang="en">Malicious plugin names, recipients, or identities can cause arbitrary binary execution</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/age/RUSTSEC-2024-0433.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/age/RUSTSEC-2024-0433.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0433">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2024-0433
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>Malicious plugin names, recipients, or identities can cause arbitrary binary execution</p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2024-12-18">
|
||
December 18, 2024
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2025-01-03">
|
||
January 3, 2025
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/age.html">age</a>
|
||
(<a href="https://crates.io/crates/age">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
Vulnerability
|
||
|
||
</dd>
|
||
|
||
|
||
<dt id="categories">Categories</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><a href="/categories/code-execution.html">code-execution</a></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="aliases">Aliases</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
|
||
<a href="https://github.com/advisories/GHSA-4fg7-vxc8-qx5w">GHSA-4fg7-vxc8-qx5w</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/str4d/rage/security/advisories/GHSA-4fg7-vxc8-qx5w">
|
||
https://github.com/str4d/rage/security/advisories/GHSA-4fg7-vxc8-qx5w
|
||
</a>
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt id="related">Related</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
|
||
<a href="https://github.com/advisories/GHSA-32gq-x56h-299c">GHSA-32gq-x56h-299c</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.6.1, &lt;0.7.0</code></li>
|
||
|
||
<li><code>&gt;=0.7.2, &lt;0.8.0</code></li>
|
||
|
||
<li><code>&gt;=0.8.2, &lt;0.9.0</code></li>
|
||
|
||
<li><code>&gt;=0.9.3, &lt;0.10.0</code></li>
|
||
|
||
<li><code>&gt;=0.10.1, &lt;0.11.0</code></li>
|
||
|
||
<li><code>&gt;=0.11.1</code></li>
|
||
|
||
</ul>
|
||
|
||
</dd>
|
||
|
||
|
||
<dt id="unaffected">Unaffected</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&lt;0.6.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt>Affected Functions</dt>
|
||
<dd>Version</dd>
|
||
|
||
<dt><code>age::plugin::Identity::default_for_plugin</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.7.0, &lt;0.7.2</code></li>
|
||
|
||
<li><code>&gt;=0.8.0, &lt;0.8.2</code></li>
|
||
|
||
<li><code>&gt;=0.9.0, &lt;0.9.3</code></li>
|
||
|
||
<li><code>^0.10.0</code></li>
|
||
|
||
<li><code>^0.11.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
<dt><code>age::plugin::Identity::from_str</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>^0.6.0</code></li>
|
||
|
||
<li><code>&gt;=0.7.0, &lt;0.7.2</code></li>
|
||
|
||
<li><code>&gt;=0.8.0, &lt;0.8.2</code></li>
|
||
|
||
<li><code>&gt;=0.9.0, &lt;0.9.3</code></li>
|
||
|
||
<li><code>^0.10.0</code></li>
|
||
|
||
<li><code>^0.11.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
<dt><code>age::plugin::IdentityPluginV1::new</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>^0.6.0</code></li>
|
||
|
||
<li><code>&gt;=0.7.0, &lt;0.7.2</code></li>
|
||
|
||
<li><code>&gt;=0.8.0, &lt;0.8.2</code></li>
|
||
|
||
<li><code>&gt;=0.9.0, &lt;0.9.3</code></li>
|
||
|
||
<li><code>^0.10.0</code></li>
|
||
|
||
<li><code>^0.11.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
<dt><code>age::plugin::Recipient::from_str</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>^0.6.0</code></li>
|
||
|
||
<li><code>&gt;=0.7.0, &lt;0.7.2</code></li>
|
||
|
||
<li><code>&gt;=0.8.0, &lt;0.8.2</code></li>
|
||
|
||
<li><code>&gt;=0.9.0, &lt;0.9.3</code></li>
|
||
|
||
<li><code>^0.10.0</code></li>
|
||
|
||
<li><code>^0.11.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
<dt><code>age::plugin::RecipientPluginV1::new</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>^0.6.0</code></li>
|
||
|
||
<li><code>&gt;=0.7.0, &lt;0.7.2</code></li>
|
||
|
||
<li><code>&gt;=0.8.0, &lt;0.8.2</code></li>
|
||
|
||
<li><code>&gt;=0.9.0, &lt;0.9.3</code></li>
|
||
|
||
<li><code>^0.10.0</code></li>
|
||
|
||
<li><code>^0.11.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<p>A plugin name containing a path separator may allow an attacker to execute an arbitrary
|
||
binary.</p>
|
||
<p>Such a plugin name can be provided through an attacker-controlled input to the following
|
||
<code>age</code> APIs when the <code>plugin</code> feature flag is enabled:</p>
|
||
<ul>
|
||
<li><a href="https://docs.rs/age/0.11.0/age/plugin/struct.Identity.html#impl-FromStr-for-Identity"><code>age::plugin::Identity::from_str</code></a>
|
||
(or equivalently <a href="https://doc.rust-lang.org/stable/core/primitive.str.html#method.parse"><code>str::parse::&lt;age::plugin::Identity&gt;()</code></a>)</li>
|
||
<li><a href="https://docs.rs/age/0.11.0/age/plugin/struct.Identity.html#method.default_for_plugin"><code>age::plugin::Identity::default_for_plugin</code></a></li>
|
||
<li><a href="https://docs.rs/age/0.11.0/age/plugin/struct.IdentityPluginV1.html#method.new"><code>age::plugin::IdentityPluginV1::new</code></a>
|
||
(the <code>plugin_name</code> argument)</li>
|
||
<li><a href="https://docs.rs/age/0.11.0/age/plugin/struct.Recipient.html#impl-FromStr-for-Recipient"><code>age::plugin::Recipient::from_str</code></a>
|
||
(or equivalently <a href="https://doc.rust-lang.org/stable/core/primitive.str.html#method.parse"><code>str::parse::&lt;age::plugin::Recipient&gt;()</code></a>)</li>
|
||
<li><a href="https://docs.rs/age/0.11.0/age/plugin/struct.RecipientPluginV1.html#method.new"><code>age::plugin::RecipientPluginV1::new</code></a>
|
||
(the <code>plugin_name</code> argument)</li>
|
||
</ul>
|
||
<p>On UNIX systems, a directory matching <code>age-plugin-*</code> needs to exist in the working
|
||
directory for the attack to succeed.</p>
|
||
<p>The binary is executed with a single flag, either <code>--age-plugin=recipient-v1</code> or
|
||
<code>--age-plugin=identity-v1</code>. The standard input includes the recipient or identity string,
|
||
and the random file key (if encrypting) or the header of the file (if decrypting). The
|
||
format is constrained by the <a href="https://c2sp.org/age-plugin">age-plugin</a> protocol.</p>
|
||
<p>An equivalent issue was fixed in <a href="https://github.com/FiloSottile/age">the reference Go implementation of age</a>,
|
||
see advisory <a href="https://github.com/FiloSottile/age/security/advisories/GHSA-32gq-x56h-299c">GHSA-32gq-x56h-299c</a>.</p>
|
||
<p>Thanks to ⬡-49016 for reporting this issue.</p>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry><entry><title>RUSTSEC-2024-0430: Vulnerability in magic-crypt</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0430.html</id><updated>2024-12-28T12:00:00+00:00</updated><category term="crypto-failure"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0430.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0430: Vulnerability in magic-crypt"/><published>2024-12-28T12:00:00+00:00</published><summary xml:lang="en">Use of insecure cryptographic algorithms</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/magic-crypt/RUSTSEC-2024-0430.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/magic-crypt/RUSTSEC-2024-0430.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0430">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2024-0430
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>Use of insecure cryptographic algorithms</p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2024-12-28">
|
||
December 28, 2024
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2024-12-28">
|
||
December 28, 2024
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/magic-crypt.html">magic-crypt</a>
|
||
(<a href="https://crates.io/crates/magic-crypt">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
Vulnerability
|
||
|
||
</dd>
|
||
|
||
|
||
<dt id="categories">Categories</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><a href="/categories/crypto-failure.html">crypto-failure</a></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt id="keywords">Keywords</dt>
|
||
<dd>
|
||
|
||
<a href="/keywords/crypto.html">#crypto</a>
|
||
|
||
<a href="/keywords/unsound.html">#unsound</a>
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/magiclen/rust-magiccrypt/issues/17">
|
||
https://github.com/magiclen/rust-magiccrypt/issues/17
|
||
</a>
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
no patched versions
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<p>This crate uses a number of cryptographic algorithms that are no longer
|
||
considered secure and it uses them in ways that do not guarantee the integrity
|
||
of the encrypted data.</p>
|
||
<p><code>MagicCrypt64</code> uses the insecure DES block cipher in CBC mode without
|
||
authentication. This allows for practical brute force and padding oracle
|
||
attacks and does not protect the integrity of the encrypted data. Key and IV
|
||
are generated from user input using CRC64, which is not at all a key derivation
|
||
function.</p>
|
||
<p><code>MagicCrypt64</code>, <code>MagicCrypt128</code>, <code>MagicCrypt192</code>, and <code>MagicCrypt256</code> are all
|
||
vulnerable to padding-oracle attacks. None of them protect the integrity of the
|
||
ciphertext. Furthermore, none use password-based key derivation functions, even
|
||
though the key is intended to be generated from a password.</p>
|
||
<p>Each of the implementations are unsound in that they use uninitialized memory
|
||
without <code>MaybeUninit</code> or equivalent structures.</p>
|
||
<p>For more information, visit the <a href="https://github.com/magiclen/rust-magiccrypt/issues/17">issue</a>.</p>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry><entry><title>RUSTSEC-2024-0431: Unsoundness in xous</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0431.html</id><updated>2024-12-28T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0431.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0431: Unsoundness in xous"/><published>2024-12-28T12:00:00+00:00</published><summary xml:lang="en">Unsound usages of `core::slice::from_raw_parts`</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/xous/RUSTSEC-2024-0431.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/xous/RUSTSEC-2024-0431.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0431">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2024-0431
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>Unsound usages of <code>core::slice::from_raw_parts</code></p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2024-12-23">
|
||
December 23, 2024
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2024-12-28">
|
||
December 28, 2024
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/xous.html">xous</a>
|
||
(<a href="https://crates.io/crates/xous">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
<span class="tag info">INFO</span>
|
||
Unsound
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/betrusted-io/xous-core/issues/410">
|
||
https://github.com/betrusted-io/xous-core/issues/410
|
||
</a>
|
||
</li>
|
||
|
||
|
||
<li>
|
||
<a href="https://github.com/betrusted-io/xous-core/pull/411">
|
||
https://github.com/betrusted-io/xous-core/pull/411
|
||
</a>
|
||
</li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.9.51</code></li>
|
||
|
||
</ul>
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt>Affected Functions</dt>
|
||
<dd>Version</dd>
|
||
|
||
<dt><code>xous::definitions::MemoryRange::as_slice</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&lt;0.9.51</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
<dt><code>xous::definitions::MemoryRange::as_slice_mut</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&lt;0.9.51</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<p>We consider <code>as_slice</code> and <code>as_slice_mut</code> unsound because: the pointer with any bit patterns could be cast to the slice of arbitrary types. The pointer could be created by unsafe new and deprecated <code>from_parts</code>. We consider that <code>from_parts</code> should be removed in latest version because it will help trigger unsoundness in <code>as_slice</code>. With new declared as unsafe, <code>as_slice</code> should also declared as unsafe.</p>
|
||
<p>This was patched in by marking two functions as <code>unsafe</code>.</p>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry><entry><title>RUSTSEC-2024-0429: Unsoundness in glib</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0429.html</id><updated>2024-12-23T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0429.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0429: Unsoundness in glib"/><published>2024-12-23T12:00:00+00:00</published><summary xml:lang="en">Unsoundness in `Iterator` and `DoubleEndedIterator` impls for `glib::VariantStrIter`</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/glib/RUSTSEC-2024-0429.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/glib/RUSTSEC-2024-0429.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0429">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2024-0429
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>Unsoundness in <code>Iterator</code> and <code>DoubleEndedIterator</code> impls for <code>glib::VariantStrIter</code></p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2024-03-30">
|
||
March 30, 2024
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2024-12-23">
|
||
December 23, 2024
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/glib.html">glib</a>
|
||
(<a href="https://crates.io/crates/glib">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
<span class="tag info">INFO</span>
|
||
Unsound
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/gtk-rs/gtk-rs-core/pull/1343">
|
||
https://github.com/gtk-rs/gtk-rs-core/pull/1343
|
||
</a>
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.20.0</code></li>
|
||
|
||
</ul>
|
||
|
||
</dd>
|
||
|
||
|
||
<dt id="unaffected">Unaffected</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&lt;0.15.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt>Affected Functions</dt>
|
||
<dd>Version</dd>
|
||
|
||
<dt><code>glib::VariantStrIter::last</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.15.0, &lt;0.20.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
<dt><code>glib::VariantStrIter::next</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.15.0, &lt;0.20.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
<dt><code>glib::VariantStrIter::next_back</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.15.0, &lt;0.20.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
<dt><code>glib::VariantStrIter::nth</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.15.0, &lt;0.20.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
<dt><code>glib::VariantStrIter::nth_back</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.15.0, &lt;0.20.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<p>The <code>VariantStrIter::impl_get</code> function (called internally by implementations of the <code>Iterator</code> and <code>DoubleEndedIterator</code> traits for this type) was unsound, resulting in undefined behaviour.</p>
|
||
<p>An immutable reference <code>&amp;p</code> to a <code>*mut libc::c_char</code> pointer initialized to <code>NULL</code> was passed as an argument to a C function that that mutates the pointer behind <code>&amp;p</code> in-place (i.e. as an out-argument), which was unsound. After changes in recent versions of the Rust compiler, these unsound writes through <code>&amp;p</code> now seem to be completely disregarded when building the <code>glib</code> crate with optimizations.</p>
|
||
<p>This subsequently caused all calls of <code>VariantStrIter::impl_get</code> to violate the safety requirements of the <code>std::ffi::CStr::from_ptr</code> function - which requires its argument to be a valid pointer to a C-style string - resulting in crashes due to <code>NULL</code> pointer dereferences.</p>
|
||
<p>This was fixed by passing the out-argument pointer explitly as <code>&amp;mut p</code> instead of <code>&amp;p</code>.</p>
|
||
<p>This issue has been present since this code was initially added in <code>glib</code> v0.15.0. The mismatch in mutability was likely missed (and not raised as an error by the compiler) because the C function wrapped by <code>VariantStrIter::impl_get</code> is variadic (<code>glib_sys::g_variant_get_child</code>), and the pointer in question is one of the variadic arguments.</p>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry><entry><title>RUSTSEC-2024-0426: Unsoundness in spl-token-swap</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0426.html</id><updated>2024-12-22T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0426.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0426: Unsoundness in spl-token-swap"/><published>2024-12-22T12:00:00+00:00</published><summary xml:lang="en">Unsound usages of `u8` type casting</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/spl-token-swap/RUSTSEC-2024-0426.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/spl-token-swap/RUSTSEC-2024-0426.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0426">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2024-0426
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>Unsound usages of <code>u8</code> type casting</p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2024-12-19">
|
||
December 19, 2024
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2024-12-22">
|
||
December 22, 2024
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/spl-token-swap.html">spl-token-swap</a>
|
||
(<a href="https://crates.io/crates/spl-token-swap">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
<span class="tag info">INFO</span>
|
||
Unsound
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
<dt id="keywords">Keywords</dt>
|
||
<dd>
|
||
|
||
<a href="/keywords/align.html">#align</a>
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/solana-labs/solana-program-library/issues/5243">
|
||
https://github.com/solana-labs/solana-program-library/issues/5243
|
||
</a>
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
no patched versions
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt>Affected Functions</dt>
|
||
<dd>Version</dd>
|
||
|
||
<dt><code>spl_token_swap::instruction::unpack</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&lt;=3.0.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<p>The library provides a safe public API <code>unpack</code> to cast <code>u8</code> array to arbitrary types, which can cause to undefined behaviors. The length check of array can only prevent out-of-bound access on the return type. However, it can't prevent misaligned pointer when casting <code>u8</code> pointer to a type aligned to larger bytes. For example, if we assign <code>u16</code> to <code>T</code>, <strong>misaligned raw pointer dereference</strong> could happen and cause to panic. Even if we pass the type aligned to same byte as <code>u8</code> (e.g., <code>bool</code>), it could construct a illegal type since <code>bool</code> can only have 0 or 1 as bit patterns, which is also an undefined behavior. The further exploits of the bug here are still not clear, so we would report this issue as unsound.</p>
|
||
<p>The details of PoC to reproduce undefined behavior are provided in the <a href="https://github.com/solana-labs/solana-program-library/issues/5243">issue</a>.</p>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry><entry><title>RUSTSEC-2024-0427: get-size-derive is unmaintained</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0427.html</id><updated>2024-12-22T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0427.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0427: get-size-derive is unmaintained"/><published>2024-12-22T12:00:00+00:00</published><summary xml:lang="en">get-size-derive is unmaintained</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/get-size-derive/RUSTSEC-2024-0427.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/get-size-derive/RUSTSEC-2024-0427.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0427">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2024-0427
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>get-size-derive is unmaintained</p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2024-09-15">
|
||
September 15, 2024
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2024-12-22">
|
||
December 22, 2024
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/get-size-derive.html">get-size-derive</a>
|
||
(<a href="https://crates.io/crates/get-size-derive">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
<span class="tag info">INFO</span>
|
||
Unmaintained
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/DKerp/get-size/issues/22">
|
||
https://github.com/DKerp/get-size/issues/22
|
||
</a>
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
no patched versions
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<p>get-size-derive's maintainer seems to be unreachable, with no commits and releases pushed for 1 year and no activity on the GitHub repo.</p>
|
||
<p>get-size-derive also depends on <code>attribute-derive ^0.6</code> a version of the crate which uses the yanked crate <code>proc-macro-error</code>.</p>
|
||
<h2>Possible Alternative(s)</h2>
|
||
<ul>
|
||
<li><a href="https://crates.io/crates/get-size-derive2">get-size-derive2</a></li>
|
||
</ul>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry><entry><title>RUSTSEC-2024-0428: Unsoundness in kvm-ioctls</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0428.html</id><updated>2024-12-22T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0428.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0428: Unsoundness in kvm-ioctls"/><published>2024-12-22T12:00:00+00:00</published><summary xml:lang="en">Undefined behaviour in `kvm_ioctls::ioctls::vm::VmFd::create_device`</summary><content xml:lang="en" type="html"> <article>
|
||
|
||
<span class="floating-menu">
|
||
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/kvm-ioctls/RUSTSEC-2024-0428.md">History</a> ⋅
|
||
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/kvm-ioctls/RUSTSEC-2024-0428.md">Edit</a> ⋅
|
||
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0428">JSON (OSV)</a>
|
||
</span>
|
||
|
||
|
||
<header>
|
||
<h1>
|
||
|
||
RUSTSEC-2024-0428
|
||
|
||
</h1>
|
||
<span class="subtitle"><p>Undefined behaviour in <code>kvm_ioctls::ioctls::vm::VmFd::create_device</code></p>
|
||
</span>
|
||
</header>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt id="reported">Reported</dt>
|
||
<dd>
|
||
<time datetime="2024-12-05">
|
||
December 5, 2024
|
||
</time>
|
||
</dd>
|
||
|
||
<dt id="issued">Issued</dt>
|
||
<dd>
|
||
<time datetime="2024-12-22">
|
||
December 22, 2024
|
||
</time>
|
||
|
||
</dd>
|
||
|
||
<dt id="package">Package</dt>
|
||
<dd>
|
||
|
||
|
||
<a href="/packages/kvm-ioctls.html">kvm-ioctls</a>
|
||
(<a href="https://crates.io/crates/kvm-ioctls">crates.io</a>)
|
||
|
||
|
||
</dd>
|
||
|
||
<dt id="type">Type</dt>
|
||
<dd>
|
||
|
||
<span class="tag info">INFO</span>
|
||
Unsound
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
<dt id="keywords">Keywords</dt>
|
||
<dd>
|
||
|
||
<a href="/keywords/unsound.html">#unsound</a>
|
||
|
||
<a href="/keywords/1-82.html">#1-82</a>
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="details">References</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li>
|
||
<a href="https://github.com/rust-vmm/kvm/pull/298">
|
||
https://github.com/rust-vmm/kvm/pull/298
|
||
</a>
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt id="patched">Patched</dt>
|
||
<dd>
|
||
|
||
<ul>
|
||
|
||
<li><code>&gt;=0.19.1</code></li>
|
||
|
||
</ul>
|
||
|
||
</dd>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<dt>Affected OSes</dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>linux</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
<dl>
|
||
<dt>Affected Functions</dt>
|
||
<dd>Version</dd>
|
||
|
||
<dt><code>kvm_ioctls::ioctls::vm::VmFd::create_device</code></dt>
|
||
<dd>
|
||
<ul>
|
||
|
||
<li><code>&lt;=0.19.0</code></li>
|
||
|
||
</ul>
|
||
</dd>
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
<h3 id="description">Description</h3>
|
||
<p>An issue was identified in the <code>VmFd::create_device function</code>, leading to undefined behavior and miscompilations on rustc 1.82.0 and newer due to the function's violation of Rust's pointer safety rules.</p>
|
||
<p>The function downcasted a mutable reference to its <code>struct kvm_create_device</code> argument to an immutable pointer, and then proceeded to pass this pointer to a mutating system call. Rustc 1.82.0 and newer elides subsequent reads of this structure's fields, meaning code will not see the value written by the kernel into the <code>fd</code> member. Instead, the code will observe the value that this field was initialized to prior to calling <code>VmFd::create_device</code> (usually, 0).</p>
|
||
<p>The issue started in kvm-ioctls 0.1.0 and was fixed in 0.19.1 by correctly using
|
||
a mutable pointer.</p>
|
||
|
||
|
||
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
||
license.
|
||
|
||
|
||
</p>
|
||
</article></content></entry></feed> |