sample_id stringlengths 27 31 | vuln_id stringlengths 9 9 | crate_name stringclasses 25
values | granularity stringclasses 3
values | year int64 2.02k 2.03k | is_vulnerable bool 2
classes | cwe_type listlengths 0 3 | vulnerable_functions listlengths 0 4 | vulnerable_lines listlengths 0 4 | files listlengths 2 56 |
|---|---|---|---|---|---|---|---|---|---|
vuln-0001/sample-00001-function | vuln-0001 | chttp | function | 2,019 | true | [
"CWE-416"
] | [
{
"file": "src/lib.rs",
"functions": [
"fn from(buffer: Buffer) -> Vec<u8>"
]
}
] | [
{
"file": "src/lib.rs",
"lines": [
95
]
}
] | [
{
"path": "Cargo.toml",
"content": "[package]\nname = \"sample-00001-function\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\n"
},
{
"path": "src/lib.rs",
"content": "use std::mem;\nuse std::slice;\n\n/// Growable byte buffer implemented as a ring buffer.\n///\n/// Optimized for re... |
vuln-0001/sample-00001-file | vuln-0001 | chttp | file | 2,019 | true | [
"CWE-416"
] | [
{
"file": "src/buffer.rs",
"functions": [
"fn from(buffer: Buffer) -> Vec<u8>"
]
}
] | [
{
"file": "src/buffer.rs",
"lines": [
195
]
}
] | [
{
"path": "Cargo.toml",
"content": "[package]\nname = \"sample-00001-file\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\n"
},
{
"path": "src/buffer.rs",
"content": "use std::io::{self, Read, Write};\nuse std::mem;\nuse std::slice;\n\n/// Macro for making memory copies more readabl... |
vuln-0001/sample-00001-crate | vuln-0001 | chttp | crate | 2,019 | true | [
"CWE-416"
] | [
{
"file": "src/buffer.rs",
"functions": [
"fn from(buffer: Buffer) -> Vec<u8>"
]
}
] | [
{
"file": "src/buffer.rs",
"lines": [
195
]
}
] | [
{
"path": "Cargo.toml",
"content": "[package]\nname = \"sample-00001-crate\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\ncurl = \"0.4\"\nhttp = \"0.1.1\"\n\n[dependencies.json]\nversion = \"0.11\"\noptional = true\n"
},
{
"path": "src/body.rs",
"content": "use crate::error::Error... |
vuln-0001/sample-10001-function | vuln-0001 | chttp | function | 2,019 | false | [] | [] | [] | [
{
"path": "Cargo.toml",
"content": "[package]\nname = \"sample-10001-function\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\n"
},
{
"path": "src/lib.rs",
"content": "use std::mem;\nuse std::slice;\n\n/// Growable byte buffer implemented as a ring buffer.\n///\n/// Optimized for re... |
vuln-0001/sample-10001-file | vuln-0001 | chttp | file | 2,019 | false | [] | [] | [] | [
{
"path": "Cargo.toml",
"content": "[package]\nname = \"sample-10001-file\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\n"
},
{
"path": "src/buffer.rs",
"content": "use std::io::{self, Read, Write};\nuse std::mem;\nuse std::slice;\n\n/// Macro for making memory copies more readabl... |
vuln-0001/sample-10001-crate | vuln-0001 | chttp | crate | 2,019 | false | [] | [] | [] | [
{
"path": "Cargo.toml",
"content": "[package]\nname = \"sample-10001-crate\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\ncurl = \"0.4\"\nhttp = \"0.1.1\"\n\n[dependencies.json]\nversion = \"0.11\"\noptional = true\n"
},
{
"path": "src/body.rs",
"content": "use crate::error::Error... |
vuln-0002/sample-00002-crate | vuln-0002 | arc-swap | crate | 2,020 | true | [
"CWE-416"
] | [{"file":"src/access.rs","functions":["fn deref(&self) -> &T","fn load(&self) -> Self::Guard","impl<(...TRUNCATED) | [
{
"file": "src/access.rs",
"lines": [
240,
287
]
}
] | [{"path":"Cargo.toml","content":"[package]\nname = \"sample-00002-crate\"\nversion = \"0.1.0\"\nedit(...TRUNCATED) |
vuln-0002/sample-00002-file | vuln-0002 | arc-swap | file | 2,020 | true | [
"CWE-416"
] | [{"file":"src/access.rs","functions":["fn deref(&self) -> &T","fn load(&self) -> Self::Guard","impl<(...TRUNCATED) | [
{
"file": "src/access.rs",
"lines": [
240,
287
]
}
] | [{"path":"Cargo.toml","content":"[package]\nname = \"sample-00002-file\"\nversion = \"0.1.0\"\nediti(...TRUNCATED) |
vuln-0002/sample-00002-function | vuln-0002 | arc-swap | function | 2,020 | true | [
"CWE-416"
] | [{"file":"src/lib.rs","functions":["fn deref(&self) -> &T","fn load(&self) -> Self::Guard","impl<T: (...TRUNCATED) | [
{
"file": "src/lib.rs",
"lines": [
19,
51
]
}
] | [{"path":"Cargo.toml","content":"[package]\nname = \"sample-00002-function\"\nversion = \"0.1.0\"\ne(...TRUNCATED) |
vuln-0002/sample-10002-crate | vuln-0002 | arc-swap | crate | 2,020 | false | [] | [] | [] | [{"path":"Cargo.toml","content":"[package]\nname = \"sample-10002-crate\"\nversion = \"0.1.0\"\nedit(...TRUNCATED) |
RustMizan
RustMizan (mizan — Arabic for "scale" or "balance") is a compilable, contamination-aware benchmark for Rust vulnerability analysis, accompanying our submission to the NeurIPS 2026 Evaluations & Datasets Track (under review).
This dataset contains 173 standalone compilable variants of 42 real-world Rust memory-safety CVEs, packaged at three levels of context (crate, file, function). It is the vanilla split — no mutations applied. The companion mutation framework, evaluation pipeline, and Kani / RAPx demonstrations are released anonymously alongside this dataset; see Code release.
What's in each row
Each row is a standalone compilable variant of one CVE at one context level. Columns:
sample_id,vuln_id,crate_namegranularity— one ofcrate,file,functionyear— CVE disclosure yearis_vulnerable— true for pre-patch variants, false for post-patchcwe_type— list of CWE identifiers (e.g.CWE-416)vulnerable_functions— list of{file, functions}entries (file path → vulnerable function signatures)vulnerable_lines— list of{file, lines}entries (file path → vulnerable line numbers)files— list of{path, content}pairs containing every source file in the variant
vulnerable_functions and vulnerable_lines are empty for is_vulnerable == false rows.
Supported tasks
The benchmark targets the full pipeline of Rust vulnerability analysis:
- Vulnerability detection (binary classification, from
is_vulnerable). - CWE classification (multi-label, from
cwe_type). - Function-level localization — predict the file → function-signature map.
- Line-level localization — predict the file → line-number map.
Code release
The companion code release contains the Python evaluation pipeline that produced the paper's RQ1–RQ4 results, the Rust mutation framework, and Kani / RAPx demonstrations referenced in the paper appendix.
The mutated variants used in the paper (benign, malignant, rust-specific) are not separately hosted as datasets. They can be regenerated by anyone running the published mutation framework on this vanilla dataset — see the code release for the recipe (docker/Dockerfile.datasets builds a container that materialises all four splits). This makes the benchmark a research substrate for studying data contamination in code benchmarks and for comparing different contamination-mitigation strategies.
Code repository: https://anonymous.4open.science/r/rust-mizan-neurips
Loading
from datasets import load_dataset
ds = load_dataset("rustmizan-org/mizan-vanilla", split="train")
Responsible AI
Limitations. Modest size: 42 CVEs across 173 compilable variants. Pre-/post-patch labelling assumes the patch fully resolves the disclosed issue and that no other vulnerabilities remain — established practice in vulnerability-detection research but does not hold in every case.
Biases. Restricted to the Rust subset of RustSec advisories with a memory-safety classification; concentrated on use-after-free, buffer overflow, and double-free. Disclosure timing skews 2018 – 2025. Not representative of vulnerabilities in other languages, non-memory-safety bug classes, or production codebases that diverge from open-source crates.
Personal / sensitive information. None. Public CVE / source-code data only.
Use cases. Vulnerability detection, CWE classification, function- and line-level localization. Through the companion mutation framework, also a research substrate for studying data contamination in code benchmarks and for comparing different contamination-mitigation strategies.
Social impact. Supports more rigorous and honest evaluation of LLM-based vulnerability analysis on a security-critical language. The companion mutation framework lets users regenerate fresh mutated variants on demand rather than relying on a fixed set of public mutated splits that risk ingestion into future LLM training corpora.
Synthetic data. No (this is the unmodified vanilla split). The framework can produce synthetic mutated variants on demand.
Provenance. Vulnerable Rust crates were sourced from the RustSec Advisory Database, manually reduced to multi-level compilable variants (crate, file, function), compile-verified with rustc 1.84.1, and ground-truth-annotated from CVE descriptions, GitHub issue discussions, commit messages, and code review. Every annotation was peer-reviewed by at least one additional researcher.
License
CC-BY-4.0. Embedded source originates from publicly disclosed Rust crates whose own licenses (typically MIT or Apache-2.0) apply to that content.
- Downloads last month
- 53