Updated dependencies (#443)

* updated dependencies

* updated info in toml

* Windows fixes

* fixed immport

* u32 -> i32

* ignore i32 overflows in constants

* removed unused double allow
This commit is contained in:
Dominik Maier 2022-01-02 17:52:44 +01:00 committed by GitHub
parent 9f76386668
commit efc804fe7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 88 additions and 72 deletions

View File

@ -35,9 +35,9 @@ libafl_frida = { path = "../../libafl_frida", features = ["cmplog"] }
libafl_targets = { path = "../../libafl_targets", features = ["sancov_cmplog"] } libafl_targets = { path = "../../libafl_targets", features = ["sancov_cmplog"] }
lazy_static = "1.4.0" lazy_static = "1.4.0"
libc = "0.2" libc = "0.2"
libloading = "0.7.0" libloading = "0.7"
num-traits = "0.2.14" num-traits = "0.2.14"
rangemap = "0.1.10" rangemap = "0.1"
structopt = "0.3.25" structopt = "0.3.25"
serde = "1.0" serde = "1.0"
mimalloc = { version = "*", default-features = false } mimalloc = { version = "*", default-features = false }

View File

@ -25,7 +25,7 @@ libafl_targets = { path = "../../libafl_targets/", features = ["sancov_pcguard_h
# TODO Include it only when building cc # TODO Include it only when building cc
libafl_cc = { path = "../../libafl_cc/" } libafl_cc = { path = "../../libafl_cc/" }
clap = { version = "3.0.0-rc.4", features = ["default"] } clap = { version = "3.0.0-rc.4", features = ["default"] }
nix = "0.23.0" nix = "0.23"
mimalloc = { version = "*", default-features = false } mimalloc = { version = "*", default-features = false }
[lib] [lib]

View File

@ -15,4 +15,4 @@ debug = true
libafl = { path = "../../libafl/" } libafl = { path = "../../libafl/" }
libafl_qemu = { path = "../../libafl_qemu/", features = ["x86_64"] } libafl_qemu = { path = "../../libafl_qemu/", features = ["x86_64"] }
clap = { version = "3.0.0-rc.4", features = ["default"] } clap = { version = "3.0.0-rc.4", features = ["default"] }
nix = "0.23.0" nix = "0.23"

View File

@ -39,7 +39,7 @@ criterion = "0.3" # Benchmarking
ahash = "0.7" # another hash ahash = "0.7" # another hash
fxhash = "0.2.1" # yet another hash fxhash = "0.2.1" # yet another hash
xxhash-rust = { version = "0.8.2", features = ["xxh3"] } # xxh3 hashing for rust xxhash-rust = { version = "0.8.2", features = ["xxh3"] } # xxh3 hashing for rust
serde_json = "1.0.60" serde_json = "1.0"
num_cpus = "1.0" # cpu count, for llmp example num_cpus = "1.0" # cpu count, for llmp example
serial_test = "0.5" serial_test = "0.5"
@ -54,18 +54,18 @@ postcard = { version = "0.7", features = ["alloc"] } # no_std compatible serde s
bincode = {version = "1.3", optional = true } bincode = {version = "1.3", optional = true }
static_assertions = "1.1.0" static_assertions = "1.1.0"
ctor = "0.1.20" ctor = "0.1.20"
num_enum = { version = "0.5.1", default-features = false } num_enum = { version = "0.5.4", default-features = false }
typed-builder = "0.9.1" # Implement the builder pattern at compiletime typed-builder = "0.9.1" # Implement the builder pattern at compiletime
ahash = { version = "0.7", default-features=false, features=["compile-time-rng"] } # The hash function already used in hashbrown ahash = { version = "0.7", default-features=false, features=["compile-time-rng"] } # The hash function already used in hashbrown
intervaltree = { version = "0.2.7", default-features = false, features = ["serde"] } intervaltree = { version = "0.2.7", default-features = false, features = ["serde"] }
libafl_derive = { version = "0.7.0", optional = true, path = "../libafl_derive" } libafl_derive = { version = "0.7.0", optional = true, path = "../libafl_derive" }
serde_json = { version = "1.0", optional = true, default-features = false, features = ["alloc"] } # an easy way to debug print SerdeAnyMap serde_json = { version = "1.0", optional = true, default-features = false, features = ["alloc"] } # an easy way to debug print SerdeAnyMap
miniz_oxide = { version = "0.4.4", optional = true} miniz_oxide = { version = "0.5", optional = true}
core_affinity = { version = "0.5", git = "https://github.com/s1341/core_affinity_rs", rev = "6648a7a", optional = true } core_affinity = { version = "0.5", git = "https://github.com/s1341/core_affinity_rs", rev = "6648a7a", optional = true }
hostname = { version = "^0.3", optional = true } # Is there really no gethostname in the stdlib? hostname = { version = "^0.3", optional = true } # Is there really no gethostname in the stdlib?
rand_core = { version = "0.5.1", optional = true } # This dependency allows us to export our RomuRand as rand::Rng. rand_core = { version = "0.5.1", optional = true } # This dependency allows us to export our RomuRand as rand::Rng. We cannot update to the latest version because it breaks compatibility to microsoft lain.
nix = { version = "0.23.0", optional = true } nix = { version = "0.23", optional = true }
regex = { version = "1", optional = true } regex = { version = "1", optional = true }
build_id = { version = "0.2.1", git = "https://github.com/domenukk/build_id", rev = "6a61943", optional = true } build_id = { version = "0.2.1", git = "https://github.com/domenukk/build_id", rev = "6a61943", optional = true }
uuid = { version = "0.8.2", optional = true, features = ["serde", "v4"] } uuid = { version = "0.8.2", optional = true, features = ["serde", "v4"] }
@ -86,10 +86,10 @@ regex = "1.4.5"
backtrace = "0.3" backtrace = "0.3"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
windows = { version = "0.28.0", features = ["std", "Win32_Foundation", "Win32_System_Threading", "Win32_System_Diagnostics_Debug", "Win32_System_Kernel", "Win32_System_Memory", "Win32_Security"] } windows = { version = "0.29.0", features = ["std", "Win32_Foundation", "Win32_System_Threading", "Win32_System_Diagnostics_Debug", "Win32_System_Kernel", "Win32_System_Memory", "Win32_Security"] }
[target.'cfg(windows)'.build-dependencies] [target.'cfg(windows)'.build-dependencies]
windows = "0.28.0" windows = "0.29.0"
[[bench]] [[bench]]
name = "rand_speeds" name = "rand_speeds"

View File

@ -24,8 +24,9 @@ pub mod pipes;
#[cfg(all(unix, feature = "std"))] #[cfg(all(unix, feature = "std"))]
use std::ffi::CString; use std::ffi::CString;
// Allow a few extra features we need for the whole module
#[cfg(all(windows, feature = "std"))] #[cfg(all(windows, feature = "std"))]
#[allow(missing_docs)] #[allow(missing_docs, overflowing_literals)]
pub mod windows_exceptions; pub mod windows_exceptions;
#[cfg(unix)] #[cfg(unix)]

View File

@ -36,55 +36,55 @@ pub const SIGABRT: i32 = 22;
pub const SIGABRT2: i32 = 22; pub const SIGABRT2: i32 = 22;
// From https://github.com/wine-mirror/wine/blob/master/include/winnt.h#L611 // From https://github.com/wine-mirror/wine/blob/master/include/winnt.h#L611
pub const STATUS_WAIT_0: u32 = 0x00000000; pub const STATUS_WAIT_0: i32 = 0x00000000;
pub const STATUS_ABANDONED_WAIT_0: u32 = 0x00000080; pub const STATUS_ABANDONED_WAIT_0: i32 = 0x00000080;
pub const STATUS_USER_APC: u32 = 0x000000C0; pub const STATUS_USER_APC: i32 = 0x000000C0;
pub const STATUS_TIMEOUT: u32 = 0x00000102; pub const STATUS_TIMEOUT: i32 = 0x00000102;
pub const STATUS_PENDING: u32 = 0x00000103; pub const STATUS_PENDING: i32 = 0x00000103;
pub const STATUS_SEGMENT_NOTIFICATION: u32 = 0x40000005; pub const STATUS_SEGMENT_NOTIFICATION: i32 = 0x40000005;
pub const STATUS_FATAL_APP_EXIT: u32 = 0x40000015; pub const STATUS_FATAL_APP_EXIT: i32 = 0x40000015;
pub const STATUS_GUARD_PAGE_VIOLATION: u32 = 0x80000001; pub const STATUS_GUARD_PAGE_VIOLATION: i32 = 0x80000001;
pub const STATUS_DATATYPE_MISALIGNMENT: u32 = 0x80000002; pub const STATUS_DATATYPE_MISALIGNMENT: i32 = 0x80000002;
pub const STATUS_BREAKPOINT: u32 = 0x80000003; pub const STATUS_BREAKPOINT: i32 = 0x80000003;
pub const STATUS_SINGLE_STEP: u32 = 0x80000004; pub const STATUS_SINGLE_STEP: i32 = 0x80000004;
pub const STATUS_LONGJUMP: u32 = 0x80000026; pub const STATUS_LONGJUMP: i32 = 0x80000026;
pub const STATUS_UNWIND_CONSOLIDATE: u32 = 0x80000029; pub const STATUS_UNWIND_CONSOLIDATE: i32 = 0x80000029;
pub const STATUS_ACCESS_VIOLATION: u32 = 0xC0000005; pub const STATUS_ACCESS_VIOLATION: i32 = 0xC0000005;
pub const STATUS_IN_PAGE_ERROR: u32 = 0xC0000006; pub const STATUS_IN_PAGE_ERROR: i32 = 0xC0000006;
pub const STATUS_INVALID_HANDLE: u32 = 0xC0000008; pub const STATUS_INVALID_HANDLE: i32 = 0xC0000008;
pub const STATUS_NO_MEMORY: u32 = 0xC0000017; pub const STATUS_NO_MEMORY: i32 = 0xC0000017;
pub const STATUS_ILLEGAL_INSTRUCTION: u32 = 0xC000001D; pub const STATUS_ILLEGAL_INSTRUCTION: i32 = 0xC000001D;
pub const STATUS_NONCONTINUABLE_EXCEPTION: u32 = 0xC0000025; pub const STATUS_NONCONTINUABLE_EXCEPTION: i32 = 0xC0000025;
pub const STATUS_INVALID_DISPOSITION: u32 = 0xC0000026; pub const STATUS_INVALID_DISPOSITION: i32 = 0xC0000026;
pub const STATUS_ARRAY_BOUNDS_EXCEEDED: u32 = 0xC000008C; pub const STATUS_ARRAY_BOUNDS_EXCEEDED: i32 = 0xC000008C;
pub const STATUS_FLOAT_DENORMAL_OPERAND: u32 = 0xC000008D; pub const STATUS_FLOAT_DENORMAL_OPERAND: i32 = 0xC000008D;
pub const STATUS_FLOAT_DIVIDE_BY_ZERO: u32 = 0xC000008E; pub const STATUS_FLOAT_DIVIDE_BY_ZERO: i32 = 0xC000008E;
pub const STATUS_FLOAT_INEXACT_RESULT: u32 = 0xC000008F; pub const STATUS_FLOAT_INEXACT_RESULT: i32 = 0xC000008F;
pub const STATUS_FLOAT_INVALID_OPERATION: u32 = 0xC0000090; pub const STATUS_FLOAT_INVALID_OPERATION: i32 = 0xC0000090;
pub const STATUS_FLOAT_OVERFLOW: u32 = 0xC0000091; pub const STATUS_FLOAT_OVERFLOW: i32 = 0xC0000091;
pub const STATUS_FLOAT_STACK_CHECK: u32 = 0xC0000092; pub const STATUS_FLOAT_STACK_CHECK: i32 = 0xC0000092;
pub const STATUS_FLOAT_UNDERFLOW: u32 = 0xC0000093; pub const STATUS_FLOAT_UNDERFLOW: i32 = 0xC0000093;
pub const STATUS_INTEGER_DIVIDE_BY_ZERO: u32 = 0xC0000094; pub const STATUS_INTEGER_DIVIDE_BY_ZERO: i32 = 0xC0000094;
pub const STATUS_INTEGER_OVERFLOW: u32 = 0xC0000095; pub const STATUS_INTEGER_OVERFLOW: i32 = 0xC0000095;
pub const STATUS_PRIVILEGED_INSTRUCTION: u32 = 0xC0000096; pub const STATUS_PRIVILEGED_INSTRUCTION: i32 = 0xC0000096;
pub const STATUS_STACK_OVERFLOW: u32 = 0xC00000FD; pub const STATUS_STACK_OVERFLOW: i32 = 0xC00000FD;
pub const STATUS_DLL_NOT_FOUND: u32 = 0xC0000135; pub const STATUS_DLL_NOT_FOUND: i32 = 0xC0000135;
pub const STATUS_ORDINAL_NOT_FOUND: u32 = 0xC0000138; pub const STATUS_ORDINAL_NOT_FOUND: i32 = 0xC0000138;
pub const STATUS_ENTRYPOINT_NOT_FOUND: u32 = 0xC0000139; pub const STATUS_ENTRYPOINT_NOT_FOUND: i32 = 0xC0000139;
pub const STATUS_CONTROL_C_EXIT: u32 = 0xC000013A; pub const STATUS_CONTROL_C_EXIT: i32 = 0xC000013A;
pub const STATUS_DLL_INIT_FAILED: u32 = 0xC0000142; pub const STATUS_DLL_INIT_FAILED: i32 = 0xC0000142;
pub const STATUS_FLOAT_MULTIPLE_FAULTS: u32 = 0xC00002B4; pub const STATUS_FLOAT_MULTIPLE_FAULTS: i32 = 0xC00002B4;
pub const STATUS_FLOAT_MULTIPLE_TRAPS: u32 = 0xC00002B5; pub const STATUS_FLOAT_MULTIPLE_TRAPS: i32 = 0xC00002B5;
pub const STATUS_REG_NAT_CONSUMPTION: u32 = 0xC00002C9; pub const STATUS_REG_NAT_CONSUMPTION: i32 = 0xC00002C9;
pub const STATUS_HEAP_CORRUPTION: u32 = 0xC0000374; pub const STATUS_HEAP_CORRUPTION: i32 = 0xC0000374;
pub const STATUS_STACK_BUFFER_OVERRUN: u32 = 0xC0000409; pub const STATUS_STACK_BUFFER_OVERRUN: i32 = 0xC0000409;
pub const STATUS_INVALID_CRUNTIME_PARAMETER: u32 = 0xC0000417; pub const STATUS_INVALID_CRUNTIME_PARAMETER: i32 = 0xC0000417;
pub const STATUS_ASSERTION_FAILURE: u32 = 0xC0000420; pub const STATUS_ASSERTION_FAILURE: i32 = 0xC0000420;
pub const STATUS_SXS_EARLY_DEACTIVATION: u32 = 0xC015000F; pub const STATUS_SXS_EARLY_DEACTIVATION: i32 = 0xC015000F;
pub const STATUS_SXS_INVALID_DEACTIVATION: u32 = 0xC0150010; pub const STATUS_SXS_INVALID_DEACTIVATION: i32 = 0xC0150010;
#[derive(Debug, TryFromPrimitive, Clone, Copy)] #[derive(Debug, TryFromPrimitive, Clone, Copy)]
#[repr(u32)] #[repr(i32)]
pub enum ExceptionCode { pub enum ExceptionCode {
// From https://docs.microsoft.com/en-us/windows/win32/debug/getexceptioncode // From https://docs.microsoft.com/en-us/windows/win32/debug/getexceptioncode
AccessViolation = STATUS_ACCESS_VIOLATION, AccessViolation = STATUS_ACCESS_VIOLATION,
@ -157,7 +157,7 @@ pub static CRASH_EXCEPTIONS: &[ExceptionCode] = &[
impl PartialEq for ExceptionCode { impl PartialEq for ExceptionCode {
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {
*self as u32 == *other as u32 *self as i32 == *other as i32
} }
} }

View File

@ -1071,7 +1071,11 @@ pub mod win32_shmem {
Error, Error,
}; };
use core::{ffi::c_void, ptr, slice}; use core::{
ffi::c_void,
fmt::{self, Debug, Formatter},
ptr, slice,
};
use std::convert::TryInto; use std::convert::TryInto;
use uuid::Uuid; use uuid::Uuid;
@ -1086,7 +1090,7 @@ pub mod win32_shmem {
}; };
/// The default Sharedmap impl for windows using shmctl & shmget /// The default Sharedmap impl for windows using shmctl & shmget
#[derive(Clone, Debug)] #[derive(Clone)]
pub struct Win32ShMem { pub struct Win32ShMem {
id: ShMemId, id: ShMemId,
handle: HANDLE, handle: HANDLE,
@ -1094,6 +1098,17 @@ pub mod win32_shmem {
map_size: usize, map_size: usize,
} }
impl Debug for Win32ShMem {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.debug_struct("Win32ShMem")
.field("id", &self.id)
.field("handle", &self.handle.0)
.field("map", &self.map)
.field("map_size", &self.map_size)
.finish()
}
}
impl Win32ShMem { impl Win32ShMem {
fn new_map(map_size: usize) -> Result<Self, Error> { fn new_map(map_size: usize) -> Result<Self, Error> {
unsafe { unsafe {
@ -1137,7 +1152,7 @@ pub mod win32_shmem {
let map_str_bytes = id.id; let map_str_bytes = id.id;
// Unlike MapViewOfFile this one needs u32 // Unlike MapViewOfFile this one needs u32
let handle = OpenFileMappingA( let handle = OpenFileMappingA(
FILE_MAP_ALL_ACCESS.0, FILE_MAP_ALL_ACCESS,
BOOL(0), BOOL(0),
PSTR(&map_str_bytes as *const u8 as *mut u8), PSTR(&map_str_bytes as *const u8 as *mut u8),
); );

View File

@ -21,16 +21,16 @@ cc = { version = "1.0", features = ["parallel"] }
[dependencies] [dependencies]
libafl = { path = "../libafl", version = "0.7.0", features = ["std", "libafl_derive"] } libafl = { path = "../libafl", version = "0.7.0", features = ["std", "libafl_derive"] }
libafl_targets = { path = "../libafl_targets", version = "0.7.0", features = ["std", "sancov_cmplog"] } libafl_targets = { path = "../libafl_targets", version = "0.7.0", features = ["std", "sancov_cmplog"] }
nix = "0.23.0" nix = "0.23"
libc = "0.2" libc = "0.2"
hashbrown = "0.11" hashbrown = "0.11"
libloading = "0.7.0" libloading = "0.7"
rangemap = "0.1.10" rangemap = "0.1"
frida-gum-sys = { version = "0.3", features = [ "auto-download", "event-sink", "invocation-listener"] } frida-gum-sys = { version = "0.3", features = [ "auto-download", "event-sink", "invocation-listener"] }
frida-gum = { version = "0.6.1", features = [ "auto-download", "event-sink", "invocation-listener"] } frida-gum = { version = "0.6.1", features = [ "auto-download", "event-sink", "invocation-listener"] }
core_affinity = { version = "0.5", git = "https://github.com/s1341/core_affinity_rs", rev = "6648a7a" } core_affinity = { version = "0.5", git = "https://github.com/s1341/core_affinity_rs", rev = "6648a7a" }
regex = "1.4" regex = "1.4"
dynasmrt = "1.0.1" dynasmrt = "1.2"
capstone = "0.10.0" capstone = "0.10.0"
color-backtrace ={ version = "0.5", features = [ "resolve-modules" ] } color-backtrace ={ version = "0.5", features = [ "resolve-modules" ] }
termcolor = "1.1.2" termcolor = "1.1.2"

View File

@ -26,9 +26,9 @@ clippy = [] # special feature for clippy, don't use in normal projects§
libafl = { path = "../libafl", version = "0.7.0" } libafl = { path = "../libafl", version = "0.7.0" }
libafl_targets = { path = "../libafl_targets", version = "0.7.0" } libafl_targets = { path = "../libafl_targets", version = "0.7.0" }
serde = { version = "1.0", default-features = false, features = ["alloc"] } # serialization lib serde = { version = "1.0", default-features = false, features = ["alloc"] } # serialization lib
hashbrown = { version = "0.9", features = ["serde", "ahash-compile-time-rng"] } # A faster hashmap, nostd compatible hashbrown = { version = "0.11", features = ["serde", "ahash-compile-time-rng"] } # A faster hashmap, nostd compatible
num-traits = "0.2" num-traits = "0.2"
num_enum = "0.5.1" num_enum = "0.5.4"
goblin = "0.4.2" goblin = "0.4.2"
libc = "0.2" libc = "0.2"
strum = "0.21" strum = "0.21"
@ -40,7 +40,7 @@ pyo3 = { version = "0.15", optional = true }
[build-dependencies] [build-dependencies]
cc = { version = "1.0" } cc = { version = "1.0" }
which = "4.1" which = "4.1"
pyo3-build-config = { version = "0.14.5", optional = true } pyo3-build-config = { version = "0.15", optional = true }
[lib] [lib]
name = "libafl_qemu" name = "libafl_qemu"

View File

@ -23,7 +23,7 @@ arm = ["libafl_qemu/arm"] # build qemu for arm
aarch64 = ["libafl_qemu/aarch64"] # build qemu for aarch64 aarch64 = ["libafl_qemu/aarch64"] # build qemu for aarch64
[build-dependencies] [build-dependencies]
pyo3-build-config = { version = "0.14.5", optional = true } pyo3-build-config = { version = "0.15", optional = true }
[dependencies] [dependencies]
libafl = { path = "../libafl", version = "0.7.0" } libafl = { path = "../libafl", version = "0.7.0" }

View File

@ -27,7 +27,7 @@ clippy = [] # Ignore compiler warnings during clippy
cc = { version = "1.0", features = ["parallel"] } cc = { version = "1.0", features = ["parallel"] }
[dependencies] [dependencies]
rangemap = "0.1.10" rangemap = "0.1"
libafl = { path = "../libafl", version = "0.7.0", features = [] } libafl = { path = "../libafl", version = "0.7.0", features = [] }
serde = { version = "1.0", default-features = false, features = ["alloc"] } # serialization lib serde = { version = "1.0", default-features = false, features = ["alloc"] } # serialization lib
# serde-big-array = "0.3.2" # serde-big-array = "0.3.2"