This project contains known security vulnerabilities. Find detailed information at the bottom.

Crate sccache

Dependencies

(71 total, 36 outdated, 4 insecure)

CrateRequiredLatestStatus
 ar^0.60.9.0out of date
 arraydeque^0.40.5.1out of date
 atty^0.2.60.2.14up to date
 base64^0.9.00.23.1out of date
 bincode^13.0.0out of date
 byteorder^1.01.5.0up to date
 bytes^0.41.12.1out of date
 chrono^0.40.4.45up to date
 clap^2.23.04.6.7out of date
 counted-array^0.10.1.2up to date
 crossbeam-utils^0.50.8.23out of date
 daemonize^0.30.5.0out of date
 directories^16.0.0out of date
 env_logger^0.50.11.11out of date
 error-chain^0.12.10.12.4up to date
 filetime^0.20.2.29up to date
 flate2^1.01.1.10up to date
 futures^0.1.110.3.34out of date
 futures-cpupool^0.10.1.8up to date
 http^0.11.5.0out of date
 hyper ⚠️^0.121.11.1insecure
 hyperx^0.121.4.0out of date
 jobserver^0.10.1.35up to date
 jsonwebtoken^5.011.1.0out of date
 lazy_static^1.0.01.5.0up to date
 libc^0.2.100.2.189up to date
 libmount^0.1.100.1.15up to date
 local-encoding^0.2.00.2.0up to date
 log^0.40.4.34up to date
 lru-disk-cache^0.3.0N/Aup to date
 memcached-rs^0.30.4.2out of date
 nix^0.11.00.31.3out of date
 num_cpus^1.01.17.0up to date
 number_prefix^0.2.50.4.0out of date
 openssl^0.100.10.81up to date
 rand^0.50.10.3out of date
 redis^0.9.01.7.0out of date
 regex^11.13.1up to date
 reqwest^0.90.13.5out of date
 retry^0.4.02.2.0out of date
 ring ⚠️^0.13.20.17.14insecure
 rouille^2.23.6.2out of date
 rust-crypto ⚠️^0.2.360.2.36insecure
 serde^1.01.0.229up to date
 serde_derive^1.01.0.229up to date
 serde_json^1.01.0.151up to date
 strip-ansi-escapes^0.10.2.1out of date
 syslog^4.0.17.0.0out of date
 tar^0.40.4.46up to date
 tempdir^0.3.40.3.7up to date
 tempfile^33.27.0up to date
 time ⚠️^0.1.350.3.55insecure
 tokio^0.1.111.53.1out of date
 tokio-io^0.10.1.13up to date
 tokio-named-pipes^0.10.1.0up to date
 tokio-process^0.20.2.5up to date
 tokio-reactor^0.10.1.12up to date
 tokio-serde-bincode^0.10.2.1out of date
 tokio-service^0.10.1.0up to date
 tokio-tcp^0.10.1.4up to date
 tokio-timer^0.20.2.13up to date
 tokio-uds^0.20.2.7up to date
 toml^0.41.1.6+spec-1.1.0out of date
 url^1.02.5.8out of date
 uuid^0.71.26.1out of date
 version-compare^0.0.80.2.1out of date
 void^11.0.2up to date
 walkdir^1.0.72.5.0out of date
 which^28.0.6out of date
 winapi^0.30.3.9up to date
 zip^0.48.6.0out of date

Dev dependencies

(7 total, 4 outdated)

CrateRequiredLatestStatus
 assert_cmd^0.92.2.2out of date
 cc^1.01.4.7up to date
 chrono^0.40.4.45up to date
 escargot^0.30.5.15out of date
 itertools^0.70.15.0out of date
 predicates^0.9.03.1.4out of date
 selenium-rs^0.10.1.2up to date

Security Vulnerabilities

time: Potential segfault in the time crate

RUSTSEC-2020-0071

Impact

The affected functions set environment variables without synchronization. On Unix-like operating systems, this can crash in multithreaded programs. Programs may segfault due to dereferencing a dangling pointer if an environment variable is read in a different thread than the affected functions. This may occur without the user's knowledge, notably in the Rust standard library or third-party libraries.

The affected functions from time 0.2.7 through 0.2.22 are:

  • time::UtcOffset::local_offset_at
  • time::UtcOffset::try_local_offset_at
  • time::UtcOffset::current_local_offset
  • time::UtcOffset::try_current_local_offset
  • time::OffsetDateTime::now_local
  • time::OffsetDateTime::try_now_local

The affected functions in time 0.1 (all versions) are:

  • time::at_utc
  • time::at
  • time::now
  • time::tzset

Non-Unix targets (including Windows and wasm) are unaffected.

Patches

Pending a proper fix, the internal method that determines the local offset has been modified to always return None on the affected operating systems. This has the effect of returning an Err on the try_* methods and UTC on the non-try_* methods.

Users and library authors with time in their dependency tree should perform cargo update, which will pull in the updated, unaffected code.

Users of time 0.1 do not have a patch and should upgrade to an unaffected version: time 0.2.23 or greater or the 0.3 series.

Workarounds

A possible workaround for crates affected through the transitive dependency in chrono, is to avoid using the default oldtime feature dependency of the chrono crate by disabling its default-features and manually specifying the required features instead.

Examples:

Cargo.toml:

chrono = { version = "0.4", default-features = false, features = ["serde"] }
chrono = { version = "0.4.22", default-features = false, features = ["clock"] }

Commandline:

cargo add chrono --no-default-features -F clock

Sources:

hyper: Lenient `hyper` header parsing of `Content-Length` could allow request smuggling

RUSTSEC-2021-0078

hyper's HTTP header parser accepted, according to RFC 7230, illegal contents inside Content-Length headers. Due to this, upstream HTTP proxies that ignore the header may still forward them along if it chooses to ignore the error.

To be vulnerable, hyper must be used as an HTTP/1 server and using an HTTP proxy upstream that ignores the header's contents but still forwards it. Due to all the factors that must line up, an attack exploiting this vulnerability is unlikely.

hyper: Integer overflow in `hyper`'s parsing of the `Transfer-Encoding` header leads to data loss

RUSTSEC-2021-0079

When decoding chunk sizes that are too large, hyper's code would encounter an integer overflow. Depending on the situation, this could lead to data loss from an incorrect total size, or in rarer cases, a request smuggling attack.

To be vulnerable, you must be using hyper for any HTTP/1 purpose, including as a client or server, and consumers must send requests or responses that specify a chunk size greater than 18 exabytes. For a possible request smuggling attack to be possible, any upstream proxies must accept a chunk size greater than 64 bits.

rust-crypto: Miscomputation when performing AES encryption in rust-crypto

RUSTSEC-2022-0011

The following Rust program demonstrates some strangeness in AES encryption - if you have an immutable key slice and then operate on that slice, you get different encryption output than if you operate on a copy of that key.

For these functions, we expect that extending a 16 byte key to a 32 byte key by repeating it gives the same encrypted data, because the underlying rust-crypto functions repeat key data up to the necessary key size for the cipher.

use crypto::{
    aes, blockmodes, buffer,
    buffer::{BufferResult, ReadBuffer, WriteBuffer},
    symmetriccipher,
};

fn encrypt(
    key: &[u8],
    iv: &[u8],
    data: &str,
) -> Result<String, symmetriccipher::SymmetricCipherError> {
    let mut encryptor =
        aes::cbc_encryptor(aes::KeySize::KeySize256, key, iv, blockmodes::PkcsPadding);

    let mut encrypted_data = Vec::<u8>::new();
    let mut read_buffer = buffer::RefReadBuffer::new(data.as_bytes());
    let mut buffer = [0; 4096];
    let mut write_buffer = buffer::RefWriteBuffer::new(&mut buffer);

    loop {
        let result = encryptor.encrypt(&mut read_buffer, &mut write_buffer, true)?;

        encrypted_data.extend(
            write_buffer
                .take_read_buffer()
                .take_remaining()
                .iter()
                .copied(),
        );

        match result {
            BufferResult::BufferUnderflow => break,
            BufferResult::BufferOverflow => {}
        }
    }

    Ok(hex::encode(encrypted_data))
}

fn working() {
    let data = "data";
    let iv = [
        0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE,
        0xFF,
    ];
    let key = [
        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E,
        0x0F,
    ];
    // The copy here makes the code work.
    let key_copy = key;
    let key2: Vec<u8> = key_copy.iter().cycle().take(32).copied().collect();
    println!("key1:{} key2: {}", hex::encode(&key), hex::encode(&key2));

    let x1 = encrypt(&key, &iv, data).unwrap();
    println!("X1: {}", x1);

    let x2 = encrypt(&key2, &iv, data).unwrap();
    println!("X2: {}", x2);

    assert_eq!(x1, x2);
}

fn broken() {
    let data = "data";
    let iv = [
        0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE,
        0xFF,
    ];
    let key = [
        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E,
        0x0F,
    ];
    // This operation shouldn't affect the contents of key at all.
    let key2: Vec<u8> = key.iter().cycle().take(32).copied().collect();
    println!("key1:{} key2: {}", hex::encode(&key), hex::encode(&key2));

    let x1 = encrypt(&key, &iv, data).unwrap();
    println!("X1: {}", x1);

    let x2 = encrypt(&key2, &iv, data).unwrap();
    println!("X2: {}", x2);

    assert_eq!(x1, x2);
}

fn main() {
    working();
    broken();
}

The output from this program:

     Running `target/host/debug/rust-crypto-test`
key1:000102030405060708090a0b0c0d0e0f key2: 000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f
X1: 90462bbe32965c8e7ea0addbbed4cddb
X2: 90462bbe32965c8e7ea0addbbed4cddb
key1:000102030405060708090a0b0c0d0e0f key2: 000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f
X1: 26e847e5e7df1947bf82a650548a7d5b
X2: 90462bbe32965c8e7ea0addbbed4cddb
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"26e847e5e7df1947bf82a650548a7d5b"`,
 right: `"90462bbe32965c8e7ea0addbbed4cddb"`', src/main.rs:83:5

Notably, the X1 key in the broken() test changes every time after rerunning the program.

ring: Some AES functions may panic when overflow checking is enabled.

RUSTSEC-2025-0009

ring::aead::quic::HeaderProtectionKey::new_mask() may panic when overflow checking is enabled. In the QUIC protocol, an attacker can induce this panic by sending a specially-crafted packet. Even unintentionally it is likely to occur in 1 out of every 2**32 packets sent and/or received.

On 64-bit targets operations using ring::aead::{AES_128_GCM, AES_256_GCM} may panic when overflow checking is enabled, when encrypting/decrypting approximately 68,719,476,700 bytes (about 64 gigabytes) of data in a single chunk. Protocols like TLS and SSH are not affected by this because those protocols break large amounts of data into small chunks. Similarly, most applications will not attempt to encrypt/decrypt 64GB of data in one chunk.

Overflow checking is not enabled in release mode by default, but RUSTFLAGS="-C overflow-checks" or overflow-checks = true in the Cargo.toml profile can override this. Overflow checking is usually enabled by default in debug mode.