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

Crate uhyve


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

 aligned_alloc^0.1N/Aup to date
 bitflags^ to date
 burst^ to date
 byteorder^11.4.3up to date
 clap^23.2.16out of date
 env_logger^ of date
 gdb-protocol^ to date
 goblin^ of date
 lazy_static^ to date
 libc^ to date
 log^ to date
 mac_address1.0.*1.1.3out of date
 nix ⚠️^ of date
 nom^ of date
 raw-cpuid ⚠️^ of date
 rustc-serialize ⚠️^
 strum^ of date
 strum_macros^ of date
 virtio-bindings^ to date
 x860.*0.51.0up to date
 kvm-bindings0.*0.5.0up to date
 kvm-ioctls0.5.*0.11.0out of date
 tun-tap^ to date
 vmm-sys-util>= to date
 xhypervisor0.0.*0.2.0out of date

Dev dependencies

(1 total, all up-to-date)

 criterion^ to date

Security Vulnerabilities

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


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.


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.


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


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.


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


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 reqested 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


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.