Building 70 Projects ranging from beginner to advanced so anyone can — learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company đŸ‘‡
Go aicertificationcloud-engineeringcybercybersecuritycybersecurity-analystcybersecurity-certificationcybersecurity-certificationscybersecurity-educationcybersecurity-jobscybersecurity-portfoliocybersecurity-projectscybersecurity-toolsgrchackinglearningpentestingproject-repositoryprojetcspython
feat(lisdex): M7.3 - libcasr reads the report positionally, and a leak report was refused outright
CarterPerez-dev4046d9a43bed
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex f1716f02..52baf3e1 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -449,9 +449,9 @@ repos:- id: check-symlinksexclude: (\.pnpm-store|node_modules)/- id: end-of-file-fixer- exclude: (\.pnpm-store|node_modules)/|^PROJECTS/advanced/hsm-emulator/vendor/|^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/crates/tlsfp-intel/seeds/+ exclude: (\.pnpm-store|node_modules)/|^PROJECTS/advanced/hsm-emulator/vendor/|^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/crates/tlsfp-intel/seeds/|^PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/- id: trailing-whitespace- exclude: (\.pnpm-store|node_modules)/|^PROJECTS/advanced/hsm-emulator/vendor/|^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/crates/tlsfp-intel/seeds/+ exclude: (\.pnpm-store|node_modules)/|^PROJECTS/advanced/hsm-emulator/vendor/|^PROJECTS/intermediate/ja3-ja4-tls-fingerprinting/crates/tlsfp-intel/seeds/|^PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/- id: check-illegal-windows-namesexclude: (\.pnpm-store|node_modules)/- id: check-executables-have-shebangsdiff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/Cargo.lock b/PROJECTS/advanced/zero-day-vulnerability-scanner/Cargo.lockindex 4f73ba3b..38fb95cb 100644--- a/PROJECTS/advanced/zero-day-vulnerability-scanner/Cargo.lock+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/Cargo.lock@@ -20,6 +20,24 @@ dependencies = ["zerocopy",]+[[package]]+name = "aho-corasick"+version = "1.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"+dependencies = [+ "memchr",+]++[[package]]+name = "android_system_properties"+version = "0.1.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc"+dependencies = [+ "libc",+]+[[package]]name = "anstream"version = "1.0.0"@@ -70,6 +88,12 @@ dependencies = ["windows-sys 0.61.2",]+[[package]]+name = "autocfg"+version = "1.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"+[[package]]name = "base64"version = "0.22.1"@@ -91,6 +115,12 @@ dependencies = ["generic-array",]+[[package]]+name = "bumpalo"+version = "3.20.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"+[[package]]name = "bytes"version = "1.12.1"@@ -113,6 +143,19 @@ version = "1.0.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"+[[package]]+name = "chrono"+version = "0.4.45"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"+dependencies = [+ "iana-time-zone",+ "js-sys",+ "num-traits",+ "wasm-bindgen",+ "windows-link",+]+[[package]]name = "clang"version = "2.0.0"@@ -209,6 +252,12 @@ dependencies = ["url",]+[[package]]+name = "core-foundation-sys"+version = "0.8.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"+[[package]]name = "cpufeatures"version = "0.2.17"@@ -316,6 +365,40 @@ dependencies = ["percent-encoding",]+[[package]]+name = "futures-core"+version = "0.3.33"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"++[[package]]+name = "futures-task"+version = "0.3.33"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"++[[package]]+name = "futures-util"+version = "0.3.33"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"+dependencies = [+ "futures-core",+ "futures-task",+ "pin-project-lite",+ "slab",+]++[[package]]+name = "gdb-command"+version = "0.7.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "73b2762e2f2c0768e1137b33e9f7cf31599994e96496f4e020cc16e0d4e66319"+dependencies = [+ "regex",+ "wait-timeout",+]+[[package]]name = "generic-array"version = "0.14.7"@@ -389,6 +472,30 @@ version = "1.10.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"+[[package]]+name = "iana-time-zone"+version = "0.1.65"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"+dependencies = [+ "android_system_properties",+ "core-foundation-sys",+ "iana-time-zone-haiku",+ "js-sys",+ "log",+ "wasm-bindgen",+ "windows-core",+]++[[package]]+name = "iana-time-zone-haiku"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"+dependencies = [+ "cc",+]+[[package]]name = "icu_collections"version = "2.2.0"@@ -514,12 +621,42 @@ version = "1.0.18"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"+[[package]]+name = "js-sys"+version = "0.3.104"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a"+dependencies = [+ "cfg-if",+ "futures-util",+ "wasm-bindgen",+]++[[package]]+name = "kodama"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f868feceed4703c842925c14232667c5f29c8059d0354154b2d06ec3bf9daf82"+[[package]]name = "libc"version = "0.2.189"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"+[[package]]+name = "libcasr"+version = "2.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "159cff1fadbb464709c30306774c57171e98cc1ea41e7767df5c63819743a453"+dependencies = [+ "chrono",+ "gdb-command",+ "kodama",+ "regex",+ "thiserror",+]+[[package]]name = "libloading"version = "0.8.9"@@ -553,6 +690,7 @@ dependencies = ["lisdex-ingest","lisdex-llm","lisdex-surface",+ "lisdex-triage","serde_json",]@@ -622,6 +760,14 @@ dependencies = ["thiserror",]+[[package]]+name = "lisdex-triage"+version = "0.0.0"+dependencies = [+ "libcasr",+ "lisdex-core",+]+[[package]]name = "litemap"version = "0.8.2"@@ -662,6 +808,15 @@ version = "0.2.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"+[[package]]+name = "num-traits"+version = "0.2.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"+dependencies = [+ "autocfg",+]+[[package]]name = "once_cell"version = "1.21.4"@@ -680,6 +835,12 @@ version = "2.3.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"+[[package]]+name = "pin-project-lite"+version = "0.2.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"+[[package]]name = "pkg-config"version = "0.3.33"@@ -719,6 +880,35 @@ dependencies = ["proc-macro2",]+[[package]]+name = "regex"+version = "1.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"+dependencies = [+ "aho-corasick",+ "memchr",+ "regex-automata",+ "regex-syntax",+]++[[package]]+name = "regex-automata"+version = "0.4.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"+dependencies = [+ "aho-corasick",+ "memchr",+ "regex-syntax",+]++[[package]]+name = "regex-syntax"+version = "0.8.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"+[[package]]name = "ring"version = "0.17.14"@@ -782,6 +972,12 @@ dependencies = ["untrusted",]+[[package]]+name = "rustversion"+version = "1.0.23"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"+[[package]]name = "serde"version = "1.0.229"@@ -848,6 +1044,12 @@ version = "0.3.10"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"+[[package]]+name = "slab"+version = "0.4.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"+[[package]]name = "smallvec"version = "1.15.2"@@ -1057,12 +1259,66 @@ version = "0.9.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"+[[package]]+name = "wait-timeout"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11"+dependencies = [+ "libc",+]+[[package]]name = "wasi"version = "0.11.1+wasi-snapshot-preview1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"+[[package]]+name = "wasm-bindgen"+version = "0.2.127"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70"+dependencies = [+ "cfg-if",+ "once_cell",+ "rustversion",+ "wasm-bindgen-macro",+ "wasm-bindgen-shared",+]++[[package]]+name = "wasm-bindgen-macro"+version = "0.2.127"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1"+dependencies = [+ "quote",+ "wasm-bindgen-macro-support",+]++[[package]]+name = "wasm-bindgen-macro-support"+version = "0.2.127"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284"+dependencies = [+ "bumpalo",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+ "wasm-bindgen-shared",+]++[[package]]+name = "wasm-bindgen-shared"+version = "0.2.127"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf"+dependencies = [+ "unicode-ident",+]+[[package]]name = "webpki-roots"version = "1.0.9"@@ -1072,12 +1328,65 @@ dependencies = ["rustls-pki-types",]+[[package]]+name = "windows-core"+version = "0.62.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"+dependencies = [+ "windows-implement",+ "windows-interface",+ "windows-link",+ "windows-result",+ "windows-strings",+]++[[package]]+name = "windows-implement"+version = "0.60.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "windows-interface"+version = "0.59.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]+[[package]]name = "windows-link"version = "0.2.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"+[[package]]+name = "windows-result"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"+dependencies = [+ "windows-link",+]++[[package]]+name = "windows-strings"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"+dependencies = [+ "windows-link",+]+[[package]]name = "windows-sys"version = "0.52.0"diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/Cargo.toml b/PROJECTS/advanced/zero-day-vulnerability-scanner/Cargo.tomlindex cfd55532..3de418bf 100644--- a/PROJECTS/advanced/zero-day-vulnerability-scanner/Cargo.toml+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/Cargo.toml@@ -13,6 +13,7 @@ authors = ["Carter Perez <[email protected]>"][workspace.dependencies]thiserror = "2"+libcasr = { version = "=2.13.1", default-features = false }clang = { version = "2.0.0", features = ["clang_10_0", "runtime"] }rusqlite = { version = "0.32", features = ["bundled"] }sha2 = "0.10"@@ -27,6 +28,7 @@ lisdex-build = { path = "crates/lisdex-build" }lisdex-surface = { path = "crates/lisdex-surface" }lisdex-harness = { path = "crates/lisdex-harness" }lisdex-llm = { path = "crates/lisdex-llm" }+lisdex-triage = { path = "crates/lisdex-triage" }[workspace.lints.rust]unsafe_code = "deny"diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-core/src/report.rs b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-core/src/report.rsindex e8976489..6fb43c2e 100644--- a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-core/src/report.rs+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-core/src/report.rs@@ -78,6 +78,11 @@ impl SanitizerReport {&self.frames}+ #[must_use]+ pub fn is_undefined_behavior(&self) -> bool {+ self.sanitizer == UBSAN_SANITIZER+ }+#[must_use]pub fn significant_frames(&self) -> Vec<&str> {self.frames@@ -124,6 +129,13 @@ impl SanitizerReport {}}+#[must_use]+pub fn anchored_lines(text: &str) -> Option<Vec<&str>> {+ let lines: Vec<&str> = text.lines().collect();+ let (index, _, _) = find_header(&lines)?;+ Some(lines[index..].to_vec())+}+fn is_unsymbolized_frame(frame: &str) -> bool {frame.starts_with(UNSYMBOLIZED_SYMBOL)}@@ -620,6 +632,55 @@ pngrutil.c:1204:7: runtime error: left shift of negative value -1);}+ #[test]+ fn anchored_lines_drop_everything_above_the_header() {+ let anchored = anchored_lines(PNG003_CANARY).unwrap();+ assert!(+ PNG003_CANARY.lines().count() > anchored.len(),+ "the fixture must carry preamble for this to mean anything"+ );+ assert!(+ anchored[0].contains(ERROR_MARKER),+ "the first line handed to a downstream consumer must be the header, because libcasr reads the fault address from line 0 and the access qualifier from lines 1-2 only: {}",+ anchored[0]+ );+ assert_eq!(+ anchored[1],+ "==29092==The signal is caused by a READ memory access."+ );+ }++ #[test]+ fn anchored_lines_keep_a_report_that_needs_no_trimming_intact() {+ let anchored = anchored_lines(UBSAN_ONLY).unwrap();+ assert_eq!(anchored.len(), UBSAN_ONLY.lines().count());+ }++ #[test]+ fn text_with_no_header_anchors_to_nothing() {+ assert!(anchored_lines("nothing interesting here\n").is_none());+ assert!(anchored_lines("").is_none());+ }++ #[test]+ fn undefined_behaviour_is_distinguished_from_the_address_sanitizer() {+ assert!(+ SanitizerReport::parse(UBSAN_ONLY)+ .unwrap()+ .is_undefined_behavior()+ );+ assert!(+ !SanitizerReport::parse(PNG003_CANARY)+ .unwrap()+ .is_undefined_behavior()+ );+ assert!(+ !SanitizerReport::parse(LEAK_REPORT)+ .unwrap()+ .is_undefined_behavior()+ );+ }+#[test]fn stack_hash_uses_only_top_frames() {let mut deeper = PNG003_CANARY.to_string();diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/Cargo.toml b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/Cargo.tomlnew file mode 100644index 00000000..ea8ecbcd--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/Cargo.toml@@ -0,0 +1,17 @@+# ©AngelaMos | 2026+# Cargo.toml++[package]+name = "lisdex-triage"+version = "0.0.0"+edition.workspace = true+rust-version.workspace = true+license.workspace = true+authors.workspace = true++[dependencies]+lisdex-core = { workspace = true }+libcasr = { workspace = true }++[lints]+workspace = truediff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/src/classify.rs b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/src/classify.rsnew file mode 100644index 00000000..ec8a96f8--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/src/classify.rs@@ -0,0 +1,200 @@+// ©AngelaMos | 2026+// classify.rs++use libcasr::asan::AsanContext;+use libcasr::severity::Severity as CasrSeverity;+use lisdex_core::report::{self, SanitizerReport};++use crate::severity::Severity;++const DOUBLE_FREE_CLASS: &str = "double-free";+const DOUBLE_FREE_SEVERITY: Severity = Severity::ProbablyExploitable;++#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]+pub enum DecidedBy {+ Casr,+ Lisdex,+}++#[derive(Debug, Clone, PartialEq, Eq)]+pub struct Classification {+ severity: Severity,+ class: String,+ decided_by: DecidedBy,+}++impl Classification {+ #[must_use]+ pub fn severity(&self) -> Severity {+ self.severity+ }++ #[must_use]+ pub fn class(&self) -> &str {+ &self.class+ }++ #[must_use]+ pub fn decided_by(&self) -> DecidedBy {+ self.decided_by+ }+}++#[must_use]+pub fn classify(text: &str) -> Option<Classification> {+ let parsed = SanitizerReport::parse(text)?;+ if parsed.is_undefined_behavior() {+ return Some(Classification {+ severity: Severity::Undefined,+ class: parsed.kind().to_owned(),+ decided_by: DecidedBy::Lisdex,+ });+ }++ let anchored = report::anchored_lines(text)?;+ let context = AsanContext(anchored.iter().map(|line| (*line).to_owned()).collect());+ let class = context.severity().ok()?;+ let severity = Severity::from_casr(&class.severity)?;++ if class.short_description == DOUBLE_FREE_CLASS {+ return Some(Classification {+ severity: DOUBLE_FREE_SEVERITY,+ class: class.short_description,+ decided_by: DecidedBy::Lisdex,+ });+ }++ Some(Classification {+ severity,+ class: class.short_description,+ decided_by: DecidedBy::Casr,+ })+}++#[cfg(test)]+mod tests {+ use super::*;++ const HEAP_WRITE: &str = "\+=================================================================+==53767==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7bd6bfde0020 at pc 0x558474e40fd9+WRITE of size 32 at 0x7bd6bfde0020 thread T0+ #0 0x558474e40fd8 in heap_write /work/target/doc07lab/asanlab.c:12:3+SUMMARY: AddressSanitizer: heap-buffer-overflow (/work/target/doc07lab/asanlab+0xcdfd8) in heap_write+";++ const HEAP_READ: &str = "\+=================================================================+==53768==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7bd6bfde0020 at pc 0x558474e40fd9+READ of size 1 at 0x7bd6bfde0020 thread T0+ #0 0x558474e40fd8 in heap_read /work/target/doc07lab/asanlab.c:20:10+SUMMARY: AddressSanitizer: heap-buffer-overflow (/work/target/doc07lab/asanlab+0x114a76) in heap_read+";++ const DOUBLE_FREE: &str = "\+=================================================================+==53770==ERROR: AddressSanitizer: attempting double-free on 0x7b6189de0040 in thread T0:+ #0 0x558474e42daa in free /work/target/doc07lab/asanlab.c:49:3+SUMMARY: AddressSanitizer: double-free (/work/target/doc07lab/asanlab+0xcfdaa) in free+";++ const NULL_DEREF: &str = "\+AddressSanitizer:DEADLYSIGNAL+=================================================================+==53781==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x556019fc2de9 bp 0x7ffee6a1c130 sp 0x7ffee6a1c120 T0)+==53781==The signal is caused by a READ memory access.+==53781==Hint: address points at the zero page.+ #0 0x556019fc2de8 in null_deref /work/target/doc07lab/asanlab.c:60:10+SUMMARY: AddressSanitizer: SEGV (/work/target/doc07lab/asanlab+0x114de9) in null_deref+";++ const MEMORY_LEAK: &str = "+=================================================================+==212189==ERROR: LeakSanitizer: detected memory leaks++Direct leak of 2544 byte(s) in 32 object(s) allocated from:+ #0 0x55af16e4d048 in malloc /work/target/doc07lab/leaklab.c:10:22+ #1 0x55af16e91839 in lose_it /work/target/doc07lab/leaklab.c:10:22+SUMMARY: AddressSanitizer: 2544 byte(s) leaked in 32 allocation(s).+";++ const UBSAN_SHIFT: &str = "\+ubsanlab.c:21:12: runtime error: shift exponent 35 is too large for 32-bit type 'int'+SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ubsanlab.c:21:12+";++ #[test]+ fn a_write_overflow_is_exploitable_and_a_read_overflow_is_not() {+ let write = classify(HEAP_WRITE).unwrap();+ let read = classify(HEAP_READ).unwrap();+ assert_eq!(write.severity(), Severity::Exploitable);+ assert_eq!(write.class(), "heap-buffer-overflow(write)");+ assert_eq!(read.severity(), Severity::NotExploitable);+ assert_eq!(read.class(), "heap-buffer-overflow(read)");+ }++ #[test]+ fn double_free_is_overridden_above_the_taxonomy_verdict() {+ let classification = classify(DOUBLE_FREE).unwrap();+ assert_eq!(classification.class(), DOUBLE_FREE_CLASS);+ assert_eq!(+ classification.severity(),+ Severity::ProbablyExploitable,+ "libcasr calls double-free NOT_EXPLOITABLE; corrupting allocator metadata is a well-known write primitive, so the verdict is lisdex's, not the taxonomy's"+ );+ assert_eq!(classification.decided_by(), DecidedBy::Lisdex);+ }++ #[test]+ fn a_null_dereference_is_recognised_as_near_null_not_a_bare_access_violation() {+ let classification = classify(NULL_DEREF).unwrap();+ assert_eq!(+ classification.class(),+ "SourceAvNearNull",+ "libcasr reads the fault address from line 0 and the READ/WRITE qualifier from lines 1-2 only; this report carries a DEADLYSIGNAL preamble, so without anchoring the report to its header line the class degrades to a bare AccessViolation"+ );+ assert_eq!(classification.severity(), Severity::NotExploitable);+ }++ #[test]+ fn a_leak_report_is_classified_rather_than_refused() {+ assert!(+ MEMORY_LEAK.starts_with('\n'),+ "the fixture must reproduce the shape a real capture has: LeakSanitizer opens with a blank line, so it is not the first line libcasr would see"+ );+ let classification = classify(MEMORY_LEAK).unwrap();+ assert_eq!(+ classification.class(),+ "memory-leaks",+ "libcasr only reaches its LeakSanitizer branch when the header is the first line it sees, and a real captured leak report opens with a blank line"+ );+ assert_eq!(classification.severity(), Severity::NotExploitable);+ }++ #[test]+ fn undefined_behaviour_is_never_stamped_not_exploitable_by_the_taxonomy() {+ let classification = classify(UBSAN_SHIFT).unwrap();+ assert_eq!(+ classification.decided_by(),+ DecidedBy::Lisdex,+ "libcasr hardcodes NOT_EXPLOITABLE for every UBSan finding without consulting CLASSES, and a verdict of safe must never come from a path that cannot produce any other answer"+ );+ assert_eq!(+ classification.severity(),+ Severity::Undefined,+ "lisdex has no ground-truth corpus for UBSan severity, so the finding is flagged for review rather than assigned a tier it cannot defend"+ );+ assert!(+ classification.class().contains("shift exponent"),+ "the SUMMARY line says only the generic undefined-behavior, so the class must come from the runtime error description: {}",+ classification.class()+ );+ }++ #[test]+ fn text_that_is_not_a_sanitizer_report_is_refused() {+ assert!(classify("").is_none());+ assert!(classify("hello world\n").is_none());+ assert!(classify("\n\n").is_none());+ }+}diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/src/lib.rs b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/src/lib.rsnew file mode 100644index 00000000..dc131f42--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/src/lib.rs@@ -0,0 +1,5 @@+// ©AngelaMos | 2026+// lib.rs++pub mod classify;+pub mod severity;diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/src/severity.rs b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/src/severity.rsnew file mode 100644index 00000000..dfdd91db--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/src/severity.rs@@ -0,0 +1,105 @@+// ©AngelaMos | 2026+// severity.rs++pub const CASR_EXPLOITABLE: &str = "EXPLOITABLE";+pub const CASR_PROBABLY_EXPLOITABLE: &str = "PROBABLY_EXPLOITABLE";+pub const CASR_NOT_EXPLOITABLE: &str = "NOT_EXPLOITABLE";+pub const CASR_UNDEFINED: &str = "UNDEFINED";++#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]+pub enum Severity {+ Exploitable,+ ProbablyExploitable,+ NotExploitable,+ Undefined,+}++impl Severity {+ #[must_use]+ pub fn from_casr(severity: &str) -> Option<Self> {+ match severity {+ CASR_EXPLOITABLE => Some(Self::Exploitable),+ CASR_PROBABLY_EXPLOITABLE => Some(Self::ProbablyExploitable),+ CASR_NOT_EXPLOITABLE => Some(Self::NotExploitable),+ CASR_UNDEFINED => Some(Self::Undefined),+ _ => None,+ }+ }++ #[must_use]+ pub fn as_str(self) -> &'static str {+ match self {+ Self::Exploitable => CASR_EXPLOITABLE,+ Self::ProbablyExploitable => CASR_PROBABLY_EXPLOITABLE,+ Self::NotExploitable => CASR_NOT_EXPLOITABLE,+ Self::Undefined => CASR_UNDEFINED,+ }+ }+}++#[cfg(test)]+mod tests {+ use std::collections::BTreeMap;++ use libcasr::execution_class::CLASSES;++ use super::*;++ const TAXONOMY_SIZE: usize = 75;+ const EXPLOITABLE_CLASSES: usize = 18;+ const PROBABLY_EXPLOITABLE_CLASSES: usize = 22;+ const NOT_EXPLOITABLE_CLASSES: usize = 34;+ const UNDEFINED_CLASSES: usize = 1;++ #[test]+ fn every_severity_the_pinned_taxonomy_can_produce_has_a_typed_equivalent() {+ let unmapped: Vec<String> = CLASSES+ .iter()+ .filter(|(severity, _, _, _)| Severity::from_casr(severity).is_none())+ .map(|(severity, class, _, _)| format!("{class} -> {severity}"))+ .collect();+ assert!(+ unmapped.is_empty(),+ "libcasr types severity as a String, so a new tier upstream is never a compile error and would silently fall out of triage: {unmapped:?}"+ );+ }++ #[test]+ fn the_pinned_taxonomy_still_has_the_shape_this_crate_was_written_against() {+ let mut tiers: BTreeMap<&str, usize> = BTreeMap::new();+ for (severity, _, _, _) in CLASSES {+ *tiers.entry(severity).or_default() += 1;+ }+ assert_eq!(CLASSES.len(), TAXONOMY_SIZE);+ assert_eq!(tiers.len(), 4);+ assert_eq!(tiers[CASR_EXPLOITABLE], EXPLOITABLE_CLASSES);+ assert_eq!(+ tiers[CASR_PROBABLY_EXPLOITABLE],+ PROBABLY_EXPLOITABLE_CLASSES+ );+ assert_eq!(tiers[CASR_NOT_EXPLOITABLE], NOT_EXPLOITABLE_CLASSES);+ assert_eq!(+ tiers[CASR_UNDEFINED], UNDEFINED_CLASSES,+ "the taxonomy is pinned at =2.13.1, so this can only move by a deliberate version bump, and a bump must be re-censused before it ships"+ );+ }++ #[test]+ fn a_severity_string_outside_the_taxonomy_is_refused_rather_than_guessed() {+ assert_eq!(Severity::from_casr("VERY_EXPLOITABLE"), None);+ assert_eq!(Severity::from_casr(""), None);+ assert_eq!(Severity::from_casr("exploitable"), None);+ }++ #[test]+ fn the_typed_severity_round_trips_through_its_taxonomy_string() {+ for severity in [+ Severity::Exploitable,+ Severity::ProbablyExploitable,+ Severity::NotExploitable,+ Severity::Undefined,+ ] {+ assert_eq!(Severity::from_casr(severity.as_str()), Some(severity));+ }+ }+}diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/dfree.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/dfree.txtnew file mode 100644index 00000000..a87b8ab7--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/dfree.txt@@ -0,0 +1,28 @@+=================================================================+==53777==ERROR: AddressSanitizer: attempting double-free on 0x7b994ffe0040 in thread T0:+ #0 0x5623f0dcadaa (/work/target/doc07lab/asanlab+0xcfdaa) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x5623f0e0fd17 (/work/target/doc07lab/asanlab+0x114d17) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x5623f0e0f91b (/work/target/doc07lab/asanlab+0x11491b) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7f6950ca21c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7f6950ca228a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x5623f0d27354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++0x7b994ffe0040 is located 0 bytes inside of 32-byte region [0x7b994ffe0040,0x7b994ffe0060)+freed by thread T0 here:+ #0 0x5623f0dcadaa (/work/target/doc07lab/asanlab+0xcfdaa) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x5623f0e0fd0e (/work/target/doc07lab/asanlab+0x114d0e) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x5623f0e0f91b (/work/target/doc07lab/asanlab+0x11491b) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7f6950ca21c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7f6950ca228a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x5623f0d27354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++previously allocated by thread T0 here:+ #0 0x5623f0dcb048 (/work/target/doc07lab/asanlab+0xd0048) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x5623f0e0fd01 (/work/target/doc07lab/asanlab+0x114d01) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x5623f0e0f91b (/work/target/doc07lab/asanlab+0x11491b) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7f6950ca21c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7f6950ca228a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x5623f0d27354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++SUMMARY: AddressSanitizer: double-free (/work/target/doc07lab/asanlab+0xcfdaa) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+==53777==ABORTINGdiff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/globalw.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/globalw.txtnew file mode 100644index 00000000..4c5c1c55--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/globalw.txt@@ -0,0 +1,44 @@+=================================================================+==53779==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55783efd9df0 at pc 0x55783e649d80 bp 0x7ffe50cdfd30 sp 0x7ffe50cdfd28+WRITE of size 4 at 0x55783efd9df0 thread T0+ #0 0x55783e649d7f (/work/target/doc07lab/asanlab+0x114d7f) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x55783e649944 (/work/target/doc07lab/asanlab+0x114944) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x7fde8d6041c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #3 0x7fde8d60428a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x55783e561354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++0x55783efd9df0 is located 16 bytes before global variable 'g_sink' defined in 'asanlab.c' (0x55783efd9e00) of size 8+0x55783efd9df0 is located 0 bytes after global variable 'g_global' defined in 'asanlab.c' (0x55783efd9de0) of size 16+SUMMARY: AddressSanitizer: global-buffer-overflow (/work/target/doc07lab/asanlab+0x114d7f) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+Shadow bytes around the buggy address:+ 0x55783efd9b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x55783efd9b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x55783efd9c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x55783efd9c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x55783efd9d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+=>0x55783efd9d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[f9]f9+ 0x55783efd9e00: 00 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00+ 0x55783efd9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x55783efd9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x55783efd9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x55783efda000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+Shadow byte legend (one shadow byte represents 8 application bytes):+ Addressable: 00+ Partially addressable: 01 02 03 04 05 06 07+ Heap left redzone: fa+ Freed heap region: fd+ Stack left redzone: f1+ Stack mid redzone: f2+ Stack right redzone: f3+ Stack after return: f5+ Stack use after scope: f8+ Global redzone: f9+ Global init order: f6+ Poisoned by user: f7+ Container overflow: fc+ Array cookie: ac+ Intra object redzone: bb+ ASan internal: fe+ Left alloca redzone: ca+ Right alloca redzone: cb+==53779==ABORTINGdiff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/heapr.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/heapr.txtnew file mode 100644index 00000000..34cc5553--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/heapr.txt@@ -0,0 +1,51 @@+=================================================================+==53769==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7bc207fe0020 at pc 0x55afa18b1a77 bp 0x7fffd633efa0 sp 0x7fffd633ef98+READ of size 1 at 0x7bc207fe0020 thread T0+ #0 0x55afa18b1a76 (/work/target/doc07lab/asanlab+0x114a76) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x55afa18b1877 (/work/target/doc07lab/asanlab+0x114877) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x7fa208c4a1c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #3 0x7fa208c4a28a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x55afa17c9354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++0x7bc207fe0020 is located 0 bytes after 16-byte region [0x7bc207fe0010,0x7bc207fe0020)+allocated by thread T0 here:+ #0 0x55afa186d048 (/work/target/doc07lab/asanlab+0xd0048) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x55afa18b1a11 (/work/target/doc07lab/asanlab+0x114a11) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x55afa18b1877 (/work/target/doc07lab/asanlab+0x114877) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7fa208c4a1c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7fa208c4a28a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x55afa17c9354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++SUMMARY: AddressSanitizer: heap-buffer-overflow (/work/target/doc07lab/asanlab+0x114a76) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+Shadow bytes around the buggy address:+ 0x7bc207fdfd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bc207fdfe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bc207fdfe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bc207fdff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bc207fdff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+=>0x7bc207fe0000: fa fa 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa+ 0x7bc207fe0080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bc207fe0100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bc207fe0180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bc207fe0200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bc207fe0280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+Shadow byte legend (one shadow byte represents 8 application bytes):+ Addressable: 00+ Partially addressable: 01 02 03 04 05 06 07+ Heap left redzone: fa+ Freed heap region: fd+ Stack left redzone: f1+ Stack mid redzone: f2+ Stack right redzone: f3+ Stack after return: f5+ Stack use after scope: f8+ Global redzone: f9+ Global init order: f6+ Poisoned by user: f7+ Container overflow: fc+ Array cookie: ac+ Intra object redzone: bb+ ASan internal: fe+ Left alloca redzone: ca+ Right alloca redzone: cb+==53769==ABORTINGdiff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/heapw.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/heapw.txtnew file mode 100644index 00000000..9801882f--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/heapw.txt@@ -0,0 +1,52 @@+=================================================================+==53767==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7bd6bfde0020 at pc 0x558474e40fd9 bp 0x7fffedf7d100 sp 0x7fffedf7c8d0+WRITE of size 32 at 0x7bd6bfde0020 thread T0+ #0 0x558474e40fd8 (/work/target/doc07lab/asanlab+0xcdfd8) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x558474e879e8 (/work/target/doc07lab/asanlab+0x1149e8) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x558474e8784e (/work/target/doc07lab/asanlab+0x11484e) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7fb6c0a0c1c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7fb6c0a0c28a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x558474d9f354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++0x7bd6bfde0020 is located 0 bytes after 16-byte region [0x7bd6bfde0010,0x7bd6bfde0020)+allocated by thread T0 here:+ #0 0x558474e43048 (/work/target/doc07lab/asanlab+0xd0048) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x558474e879d1 (/work/target/doc07lab/asanlab+0x1149d1) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x558474e8784e (/work/target/doc07lab/asanlab+0x11484e) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7fb6c0a0c1c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7fb6c0a0c28a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x558474d9f354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++SUMMARY: AddressSanitizer: heap-buffer-overflow (/work/target/doc07lab/asanlab+0xcdfd8) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+Shadow bytes around the buggy address:+ 0x7bd6bfddfd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bd6bfddfe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bd6bfddfe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bd6bfddff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bd6bfddff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+=>0x7bd6bfde0000: fa fa 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa+ 0x7bd6bfde0080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bd6bfde0100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bd6bfde0180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bd6bfde0200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bd6bfde0280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+Shadow byte legend (one shadow byte represents 8 application bytes):+ Addressable: 00+ Partially addressable: 01 02 03 04 05 06 07+ Heap left redzone: fa+ Freed heap region: fd+ Stack left redzone: f1+ Stack mid redzone: f2+ Stack right redzone: f3+ Stack after return: f5+ Stack use after scope: f8+ Global redzone: f9+ Global init order: f6+ Poisoned by user: f7+ Container overflow: fc+ Array cookie: ac+ Intra object redzone: bb+ ASan internal: fe+ Left alloca redzone: ca+ Right alloca redzone: cb+==53767==ABORTINGdiff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/leak.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/leak.txtnew file mode 100644index 00000000..d785056b--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/leak.txt@@ -0,0 +1,13 @@++=================================================================+==212189==ERROR: LeakSanitizer: detected memory leaks++Direct leak of 2544 byte(s) in 32 object(s) allocated from:+ #0 0x55af16e4d048 (/work/target/doc07lab/leaklab+0xd0048) (BuildId: 438706ebf39723a666a05f626a617dc94419303b)+ #1 0x55af16e91839 (/work/target/doc07lab/leaklab+0x114839) (BuildId: 438706ebf39723a666a05f626a617dc94419303b)+ #2 0x55af16e91805 (/work/target/doc07lab/leaklab+0x114805) (BuildId: 438706ebf39723a666a05f626a617dc94419303b)+ #3 0x7fe8ce8ac1c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7fe8ce8ac28a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x55af16da9354 (/work/target/doc07lab/leaklab+0x2c354) (BuildId: 438706ebf39723a666a05f626a617dc94419303b)++SUMMARY: AddressSanitizer: 2544 byte(s) leaked in 32 allocation(s).diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/nullderef.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/nullderef.txtnew file mode 100644index 00000000..6f4df4ae--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/nullderef.txt@@ -0,0 +1,19 @@+AddressSanitizer:DEADLYSIGNAL+=================================================================+==53781==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x556019fc2de9 bp 0x7ffee6a1c130 sp 0x7ffee6a1c110 T0)+==53781==The signal is caused by a READ memory access.+==53781==Hint: address points to the zero page.+ #0 0x556019fc2de9 (/work/target/doc07lab/asanlab+0x114de9) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x556019fc296a (/work/target/doc07lab/asanlab+0x11496a) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x7fe4c3c281c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #3 0x7fe4c3c2828a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x556019eda354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++==53781==Register values:+rax = 0x0000000000000000 rbx = 0x00007ffee6a1c298 rcx = 0x0000000000000000 rdx = 0x0000556019fd6500+rdi = 0x0000556019fc2961 rsi = 0x00007ffee6a1dc66 rbp = 0x00007ffee6a1c130 rsp = 0x00007ffee6a1c110+ r8 = 0xf9f9f905f9f90201 r9 = 0x00000aac833f2ca1 r10 = 0x000010005cd3bb8d r11 = 0x00000aac833f2ca0+r12 = 0x0000000000000002 r13 = 0x0000000000000000 r14 = 0x0000556019ffb5b0 r15 = 0x00007fe4c3f81000+AddressSanitizer can not provide additional info.+SUMMARY: AddressSanitizer: SEGV (/work/target/doc07lab/asanlab+0x114de9) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+==53781==ABORTINGdiff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/stackw.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/stackw.txtnew file mode 100644index 00000000..246c432a--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/stackw.txt@@ -0,0 +1,50 @@+=================================================================+==53771==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7b336ed00028 at pc 0x55b61e3e1fd9 bp 0x7fff9bd16890 sp 0x7fff9bd16060+WRITE of size 40 at 0x7b336ed00028 thread T0+ #0 0x55b61e3e1fd8 (/work/target/doc07lab/asanlab+0xcdfd8) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x55b61e428b70 (/work/target/doc07lab/asanlab+0x114b70) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x55b61e4288a0 (/work/target/doc07lab/asanlab+0x1148a0) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7f3370f2f1c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7f3370f2f28a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x55b61e340354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++Address 0x7b336ed00028 is located in stack of thread T0 at offset 40 in frame+ #0 0x55b61e428abf (/work/target/doc07lab/asanlab+0x114abf) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++ This frame has 1 object(s):+ [32, 40) 'buf' (line 27) <== Memory access at offset 40 overflows this variable+HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork+ (longjmp and C++ exceptions *are* supported)+SUMMARY: AddressSanitizer: stack-buffer-overflow (/work/target/doc07lab/asanlab+0xcdfd8) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+Shadow bytes around the buggy address:+ 0x7b336ecffd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7b336ecffe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7b336ecffe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7b336ecfff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7b336ecfff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+=>0x7b336ed00000: f1 f1 f1 f1 00[f3]f3 f3 00 00 00 00 00 00 00 00+ 0x7b336ed00080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7b336ed00100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7b336ed00180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7b336ed00200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7b336ed00280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+Shadow byte legend (one shadow byte represents 8 application bytes):+ Addressable: 00+ Partially addressable: 01 02 03 04 05 06 07+ Heap left redzone: fa+ Freed heap region: fd+ Stack left redzone: f1+ Stack mid redzone: f2+ Stack right redzone: f3+ Stack after return: f5+ Stack use after scope: f8+ Global redzone: f9+ Global init order: f6+ Poisoned by user: f7+ Container overflow: fc+ Array cookie: ac+ Intra object redzone: bb+ ASan internal: fe+ Left alloca redzone: ca+ Right alloca redzone: cb+==53771==ABORTINGdiff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/uaf.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/uaf.txtnew file mode 100644index 00000000..f86062db--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/uaf.txt@@ -0,0 +1,59 @@+=================================================================+==53773==ERROR: AddressSanitizer: heap-use-after-free on address 0x7c1494be0040 at pc 0x55dac84a4c20 bp 0x7ffe9a461e90 sp 0x7ffe9a461e88+WRITE of size 1 at 0x7c1494be0040 thread T0+ #0 0x55dac84a4c1f (/work/target/doc07lab/asanlab+0x114c1f) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x55dac84a48c9 (/work/target/doc07lab/asanlab+0x1148c9) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x7fe4957d61c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #3 0x7fe4957d628a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x55dac83bc354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++0x7c1494be0040 is located 0 bytes inside of 32-byte region [0x7c1494be0040,0x7c1494be0060)+freed by thread T0 here:+ #0 0x55dac845fdaa (/work/target/doc07lab/asanlab+0xcfdaa) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x55dac84a4bee (/work/target/doc07lab/asanlab+0x114bee) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x55dac84a48c9 (/work/target/doc07lab/asanlab+0x1148c9) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7fe4957d61c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7fe4957d628a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x55dac83bc354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++previously allocated by thread T0 here:+ #0 0x55dac8460048 (/work/target/doc07lab/asanlab+0xd0048) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x55dac84a4be1 (/work/target/doc07lab/asanlab+0x114be1) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x55dac84a48c9 (/work/target/doc07lab/asanlab+0x1148c9) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7fe4957d61c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7fe4957d628a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x55dac83bc354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++SUMMARY: AddressSanitizer: heap-use-after-free (/work/target/doc07lab/asanlab+0x114c1f) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+Shadow bytes around the buggy address:+ 0x7c1494bdfd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7c1494bdfe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7c1494bdfe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7c1494bdff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7c1494bdff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+=>0x7c1494be0000: fa fa 00 00 00 fa fa fa[fd]fd fd fd fa fa fa fa+ 0x7c1494be0080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7c1494be0100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7c1494be0180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7c1494be0200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7c1494be0280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+Shadow byte legend (one shadow byte represents 8 application bytes):+ Addressable: 00+ Partially addressable: 01 02 03 04 05 06 07+ Heap left redzone: fa+ Freed heap region: fd+ Stack left redzone: f1+ Stack mid redzone: f2+ Stack right redzone: f3+ Stack after return: f5+ Stack use after scope: f8+ Global redzone: f9+ Global init order: f6+ Poisoned by user: f7+ Container overflow: fc+ Array cookie: ac+ Intra object redzone: bb+ ASan internal: fe+ Left alloca redzone: ca+ Right alloca redzone: cb+==53773==ABORTINGdiff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/uafr.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/uafr.txtnew file mode 100644index 00000000..7875e92c--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/uafr.txt@@ -0,0 +1,59 @@+=================================================================+==53775==ERROR: AddressSanitizer: heap-use-after-free on address 0x7bb85b5e0047 at pc 0x563628b79cd7 bp 0x7ffe7d4212d0 sp 0x7ffe7d4212c8+READ of size 1 at 0x7bb85b5e0047 thread T0+ #0 0x563628b79cd6 (/work/target/doc07lab/asanlab+0x114cd6) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x563628b798f2 (/work/target/doc07lab/asanlab+0x1148f2) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x7f885c1d61c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #3 0x7f885c1d628a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x563628a91354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++0x7bb85b5e0047 is located 7 bytes inside of 32-byte region [0x7bb85b5e0040,0x7bb85b5e0060)+freed by thread T0 here:+ #0 0x563628b34daa (/work/target/doc07lab/asanlab+0xcfdaa) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x563628b79ca1 (/work/target/doc07lab/asanlab+0x114ca1) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x563628b798f2 (/work/target/doc07lab/asanlab+0x1148f2) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7f885c1d61c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7f885c1d628a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x563628a91354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++previously allocated by thread T0 here:+ #0 0x563628b35048 (/work/target/doc07lab/asanlab+0xd0048) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #1 0x563628b79c81 (/work/target/doc07lab/asanlab+0x114c81) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #2 0x563628b798f2 (/work/target/doc07lab/asanlab+0x1148f2) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+ #3 0x7f885c1d61c9 (/lib/x86_64-linux-gnu/libc.so.6+0x2a1c9) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #4 0x7f885c1d628a (/lib/x86_64-linux-gnu/libc.so.6+0x2a28a) (BuildId: 8e9fd827446c24067541ac5390e6f527fb5947bb)+ #5 0x563628a91354 (/work/target/doc07lab/asanlab+0x2c354) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)++SUMMARY: AddressSanitizer: heap-use-after-free (/work/target/doc07lab/asanlab+0x114cd6) (BuildId: b6da90f37d8cf516006cff859e0505ede0b9cdb7)+Shadow bytes around the buggy address:+ 0x7bb85b5dfd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bb85b5dfe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bb85b5dfe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bb85b5dff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+ 0x7bb85b5dff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00+=>0x7bb85b5e0000: fa fa 00 00 00 fa fa fa[fd]fd fd fd fa fa fa fa+ 0x7bb85b5e0080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bb85b5e0100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bb85b5e0180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bb85b5e0200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+ 0x7bb85b5e0280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa+Shadow byte legend (one shadow byte represents 8 application bytes):+ Addressable: 00+ Partially addressable: 01 02 03 04 05 06 07+ Heap left redzone: fa+ Freed heap region: fd+ Stack left redzone: f1+ Stack mid redzone: f2+ Stack right redzone: f3+ Stack after return: f5+ Stack use after scope: f8+ Global redzone: f9+ Global init order: f6+ Poisoned by user: f7+ Container overflow: fc+ Array cookie: ac+ Intra object redzone: bb+ ASan internal: fe+ Left alloca redzone: ca+ Right alloca redzone: cb+==53775==ABORTINGdiff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_divzero.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_divzero.txtnew file mode 100644index 00000000..07e00977--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_divzero.txt@@ -0,0 +1,2 @@+ubsanlab.c:16:14: runtime error: division by zero+SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ubsanlab.c:16:14diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_ptrovf.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_ptrovf.txtnew file mode 100644index 00000000..aa2fbab6--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_ptrovf.txt@@ -0,0 +1,2 @@+ubsanlab.c:26:15: runtime error: addition of unsigned offset to 0x558d605072e0 overflowed to 0x558d605072df+SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ubsanlab.c:26:15diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_shift.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_shift.txtnew file mode 100644index 00000000..a738951a--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_shift.txt@@ -0,0 +1,2 @@+ubsanlab.c:21:12: runtime error: shift exponent 35 is too large for 32-bit type 'int'+SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ubsanlab.c:21:12diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_sovf.txt b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_sovf.txtnew file mode 100644index 00000000..58d01f5b--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/fixtures/ub_sovf.txt@@ -0,0 +1,2 @@+ubsanlab.c:10:5: runtime error: signed integer overflow: 2147483646 + 7 cannot be represented in type 'int'+SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ubsanlab.c:10:5diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/real_reports.rs b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/real_reports.rsnew file mode 100644index 00000000..f46f08ce--- /dev/null+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex-triage/tests/real_reports.rs@@ -0,0 +1,185 @@+// ©AngelaMos | 2026+// real_reports.rs++use lisdex_triage::classify::{DecidedBy, classify};+use lisdex_triage::severity::Severity;++const FIXTURES: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/fixtures");++const EXPECTED: [(&str, Severity, &str, DecidedBy); 13] = [+ (+ "heapw",+ Severity::Exploitable,+ "heap-buffer-overflow(write)",+ DecidedBy::Casr,+ ),+ (+ "stackw",+ Severity::Exploitable,+ "stack-buffer-overflow(write)",+ DecidedBy::Casr,+ ),+ (+ "globalw",+ Severity::Exploitable,+ "global-buffer-overflow(write)",+ DecidedBy::Casr,+ ),+ (+ "uaf",+ Severity::Exploitable,+ "heap-use-after-free(write)",+ DecidedBy::Casr,+ ),+ (+ "heapr",+ Severity::NotExploitable,+ "heap-buffer-overflow(read)",+ DecidedBy::Casr,+ ),+ (+ "uafr",+ Severity::NotExploitable,+ "heap-use-after-free(read)",+ DecidedBy::Casr,+ ),+ (+ "nullderef",+ Severity::NotExploitable,+ "SourceAvNearNull",+ DecidedBy::Casr,+ ),+ (+ "leak",+ Severity::NotExploitable,+ "memory-leaks",+ DecidedBy::Casr,+ ),+ (+ "dfree",+ Severity::ProbablyExploitable,+ "double-free",+ DecidedBy::Lisdex,+ ),+ (+ "ub_sovf",+ Severity::Undefined,+ "signed integer overflow",+ DecidedBy::Lisdex,+ ),+ (+ "ub_divzero",+ Severity::Undefined,+ "division by zero",+ DecidedBy::Lisdex,+ ),+ (+ "ub_shift",+ Severity::Undefined,+ "shift exponent",+ DecidedBy::Lisdex,+ ),+ (+ "ub_ptrovf",+ Severity::Undefined,+ "overflowed",+ DecidedBy::Lisdex,+ ),+];++fn read(name: &str) -> String {+ let path = format!("{FIXTURES}/{name}.txt");+ std::fs::read_to_string(&path).unwrap_or_else(|err| panic!("fixture {path}: {err}"))+}++#[test]+fn every_real_captured_report_classifies_as_hand_labeled() {+ let mut wrong = Vec::new();+ for (name, severity, class, decided_by) in EXPECTED {+ let Some(actual) = classify(&read(name)) else {+ wrong.push(format!("{name}: refused, expected {}", severity.as_str()));+ continue;+ };+ if actual.severity() != severity+ || !actual.class().contains(class)+ || actual.decided_by() != decided_by+ {+ wrong.push(format!(+ "{name}: got {} / {} / {:?}, expected {} / {class} / {decided_by:?}",+ actual.severity().as_str(),+ actual.class(),+ actual.decided_by(),+ severity.as_str()+ ));+ }+ }+ assert!(+ wrong.is_empty(),+ "these are real sanitizer reports captured from a running lab, not synthesised text: {wrong:#?}"+ );+}++#[test]+fn the_fixtures_are_verbatim_captures_and_not_tidied_text() {+ let untidy: Vec<&str> = EXPECTED+ .iter()+ .map(|(name, _, _, _)| *name)+ .filter(|name| {+ read(name)+ .lines()+ .any(|line| line.ends_with(' ') || line.ends_with('\t'))+ })+ .collect();+ assert!(+ untidy.len() >= 12,+ "sanitizers emit trailing whitespace and a trailing newline, and this session measured a trailing newline silently flipping libcasr's UBSan verdict from a class to an error; a corpus a whitespace fixer has been over cannot reproduce that class of defect. Only {} of these still carry it, so the pre-commit exclusion for this directory is gone: {untidy:?}",+ untidy.len()+ );+}++#[test]+fn the_corpus_exercises_both_ends_of_the_taxonomy() {+ let severities: Vec<Severity> = EXPECTED+ .iter()+ .filter_map(|(name, _, _, _)| classify(&read(name)))+ .map(|classification| classification.severity())+ .collect();+ assert!(+ severities.contains(&Severity::Exploitable),+ "a severity layer that never returns EXPLOITABLE cannot be shown to discriminate"+ );+ assert!(severities.contains(&Severity::NotExploitable));+ assert!(severities.contains(&Severity::ProbablyExploitable));+ assert_eq!(severities.len(), EXPECTED.len(), "no report may be refused");+}++#[test]+fn a_write_and_a_read_of_the_same_bug_class_do_not_share_a_severity() {+ let write = classify(&read("heapw")).expect("heapw");+ let read_only = classify(&read("heapr")).expect("heapr");+ assert_ne!(+ write.severity(),+ read_only.severity(),+ "the same heap-buffer-overflow differing only in access direction must not collapse to one verdict; libcasr reads the direction from lines 1-2 of the anchored report and silently drops it if the report is not anchored"+ );+}++#[test]+fn no_undefined_behaviour_report_is_marked_safe_by_the_taxonomy() {+ for (name, _, _, _) in EXPECTED {+ if !name.starts_with("ub_") {+ continue;+ }+ let classification = classify(&read(name)).expect(name);+ assert_eq!(+ classification.decided_by(),+ DecidedBy::Lisdex,+ "libcasr stamps NOT_EXPLOITABLE on every UBSan finding without consulting the taxonomy, so {name} must not be routed through it"+ );+ assert_ne!(+ classification.severity(),+ Severity::NotExploitable,+ "{name} would be suppressed by a verdict the deciding path is incapable of withholding"+ );+ }+}diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex/Cargo.toml b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex/Cargo.tomlindex 97ed6d20..7e526817 100644--- a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex/Cargo.toml+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex/Cargo.toml@@ -25,4 +25,5 @@ lisdex-build.workspace = truelisdex-surface.workspace = truelisdex-harness.workspace = truelisdex-llm.workspace = true+lisdex-triage.workspace = trueserde_json.workspace = truediff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex/src/main.rs b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex/src/main.rsindex f0947916..22ed76e4 100644--- a/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex/src/main.rs+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/crates/lisdex/src/main.rs@@ -28,9 +28,11 @@ use lisdex_ingest::acquire::{self, Source};use lisdex_ingest::detect;use lisdex_surface::extract::{self, Language};use lisdex_surface::surface::{self, SurfaceOptions};+use lisdex_triage::classify::classify;const UNKNOWN_TARGET: &str = "unknown";const UNPARSED_KIND: &str = "unparsed";+const UNCLASSIFIED_SEVERITY: &str = "UNCLASSIFIED";const NO_STACK_HASH: &str = "none";const UNKEYED_MARKER: &str = "unkeyed";const STACK_HASH_SHORT_LEN: usize = 16;@@ -1171,10 +1173,17 @@ fn fuzz(args: &FuzzArgs) -> Result<(), Box<dyn Error>> {fn crash_line(crash: &Crash) -> String {let report = SanitizerReport::parse(crash.sanitizer_report());+ let classification = classify(crash.sanitizer_report());format!(- "{} bytes {} {}",+ "{} {} bytes {} {}",+ classification+ .as_ref()+ .map_or(UNCLASSIFIED_SEVERITY, |c| c.severity().as_str()),crash.input().len(),- report.as_ref().map_or(UNPARSED_KIND, |r| r.kind()),+ classification.as_ref().map_or_else(+ || report.as_ref().map_or(UNPARSED_KIND, |r| r.kind()),+ |c| c.class()+ ),report.as_ref().and_then(SanitizerReport::crash_site)@@ -1254,11 +1263,16 @@ fn crashes(args: &CrashesArgs) -> Result<(), Box<dyn Error>> {for crash in store.crashes_for_campaign(campaign_id)? {let report = SanitizerReport::parse(crash.sanitizer_report());+ let classification = classify(crash.sanitizer_report());println!(- " stack_hash {} input {} bytes kind {}",+ " stack_hash {} input {} bytes kind {} severity {} class {}",crash.stack_hash().unwrap_or(NO_STACK_HASH),crash.input().len(),- report.as_ref().map_or(UNPARSED_KIND, |r| r.kind())+ report.as_ref().map_or(UNPARSED_KIND, |r| r.kind()),+ classification+ .as_ref()+ .map_or(UNCLASSIFIED_SEVERITY, |c| c.severity().as_str()),+ classification.as_ref().map_or(UNPARSED_KIND, |c| c.class()));if let Some(report) = report {for frame in report.frames().iter().take(DISPLAYED_FRAMES) {