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

Crate uhyve

Dependencies

(25 total, 14 outdated, 1 insecure, 2 possibly insecure)

CrateRequiredLatestStatus
 aligned_alloc^0.1N/Aup to date
 bitflags^1.22.5.0out of date
 burst^0.0.20.0.3out of date
 byteorder^11.5.0up to date
 clap^24.5.4out of date
 env_logger^0.70.11.3out of date
 gdb-protocol^0.10.1.0up to date
 goblin^0.20.8.0out of date
 kvm-bindings0.*0.7.0up to date
 kvm-ioctls0.5.*0.16.0out of date
 lazy_static^1.41.4.0up to date
 libc^0.20.2.153up to date
 log^0.40.4.21up to date
 mac_address1.0.*1.1.5out of date
 nix ⚠️^0.180.28.0out of date
 nom^3.2.07.1.3out of date
 raw-cpuid ⚠️^8.111.0.1out of date
 rustc-serialize ⚠️^0.30.3.25insecure
 strum^0.8.00.26.2out of date
 strum_macros^0.8.00.26.2out of date
 tun-tap^0.1.20.1.4up to date
 virtio-bindings^0.10.2.2out of date
 vmm-sys-util>=0.2.10.12.1up to date
 x860.*0.52.0up to date
 xhypervisor0.0.*0.2.0out of date

Dev dependencies

(1 total, 1 outdated)

CrateRequiredLatestStatus
 criterion^0.3.20.5.1out of date

Security Vulnerabilities

raw-cpuid: Soundness issues in `raw-cpuid`

RUSTSEC-2021-0013

Undefined behavior in as_string() methods

VendorInfo::as_string(), SoCVendorBrand::as_string(), and ExtendedFunctionInfo::processor_brand_string() construct byte slices using std::slice::from_raw_parts(), with data coming from #[repr(Rust)] structs. This is always undefined behavior.

See https://github.com/gz/rust-cpuid/issues/40.

This flaw has been fixed in v9.0.0, by making the relevant structs #[repr(C)].

native_cpuid::cpuid_count() is unsound

native_cpuid::cpuid_count() exposes the unsafe __cpuid_count() intrinsic from core::arch::x86 or core::arch::x86_64 as a safe function, and uses it internally, without checking the safety requirement:

The CPU the program is currently running on supports the function being called.

CPUID is available in most, but not all, x86/x86_64 environments. The crate compiles only on these architectures, so others are unaffected.

This issue is mitigated by the fact that affected programs are expected to crash deterministically every time.

See https://github.com/gz/rust-cpuid/issues/41.

The flaw has been fixed in v9.0.0, by intentionally breaking compilation when targeting SGX or 32-bit x86 without SSE. This covers all affected CPUs.

raw-cpuid: Optional `Deserialize` implementations lacking validation

RUSTSEC-2021-0089

When activating the non-default feature serialize, most structs implement serde::Deserialize without sufficient validation. This allows breaking invariants in safe code, leading to:

  • Undefined behavior in as_string() methods (which use std::str::from_utf8_unchecked() internally).
  • Panics due to failed assertions.

See https://github.com/gz/rust-cpuid/issues/43.

nix: Out-of-bounds write in nix::unistd::getgrouplist

RUSTSEC-2021-0119

On certain platforms, if a user has more than 16 groups, the nix::unistd::getgrouplist function will call the libc getgrouplist function with a length parameter greater than the size of the buffer it provides, resulting in an out-of-bounds write and memory corruption.

The libc getgrouplist function takes an in/out parameter ngroups specifying the size of the group buffer. When the buffer is too small to hold all of the requested user's group memberships, some libc implementations, including glibc and Solaris libc, will modify ngroups to indicate the actual number of groups for the user, in addition to returning an error. The version of nix::unistd::getgrouplist in nix 0.16.0 and up will resize the buffer to twice its size, but will not read or modify the ngroups variable. Thus, if the user has more than twice as many groups as the initial buffer size of 8, the next call to getgrouplist will then write past the end of the buffer.

The issue would require editing /etc/groups to exploit, which is usually only editable by the root user.

rustc-serialize: Stack overflow in rustc_serialize when parsing deeply nested JSON

RUSTSEC-2022-0004

When parsing JSON using json::Json::from_str, there is no limit to the depth of the stack, therefore deeply nested objects can cause a stack overflow, which aborts the process.

Example code that triggers the vulnerability is

fn main() {
    let _ = rustc_serialize::json::Json::from_str(&"[0,[".repeat(10000));
}

serde is recommended as a replacement to rustc_serialize.