From 66814768f8c172d6996d037064924c908245a951 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 16 Apr 2025 19:21:29 +0200 Subject: fuzz against aez crate I just want to ensure that we get the same encrypted values as the reference (which seems fine), but for some reason, I get a lot of crashes in aez: AddressSanitizer:DEADLYSIGNAL ================================================================= ==15467==ERROR: AddressSanitizer: SEGV on unknown address 0x7b34b0420000 (pc 0x6371fcd8f682 bp 0x7ffceb91abf0 sp 0x7ffceb91a950 T0) ==15467==The signal is caused by a READ memory access. #0 0x6371fcd8f682 in _mm_loadu_si128 /usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/include/emmintrin.h:706:10 #1 0x6371fcd8f682 in loadu /home/daniel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aez-0.0.7/aez5-impls/aesni/encrypt.c:107:46 #2 0x6371fcd8f682 in cipher_aez_core /home/daniel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aez-0.0.7/aez5-impls/aesni/encrypt.c:572:32 #3 0x6371fcd8d581 in aez::Aez::encrypt::h56048920113a17d9 /home/daniel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aez-0.0.7/src/lib.rs:118:13 The crash --- fuzz/Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fuzz/Cargo.toml') diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 357b0ac..7c063d6 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -10,6 +10,7 @@ cargo-fuzz = true [dependencies] arbitrary = { version = "1.4.1", features = ["derive"] } libfuzzer-sys = "0.4" +aez = "0.0.7" [dependencies.zears] path = ".." @@ -20,3 +21,10 @@ path = "fuzz_targets/fuzz_target_1.rs" test = false doc = false bench = false + +[[bin]] +name = "zears_vs_aez" +path = "fuzz_targets/zears_vs_aez.rs" +test = false +doc = false +bench = false -- cgit v1.2.3