|
| 1 | +# Dataset analysis |
| 2 | + |
| 3 | +What this corpus says — read through the lens of the vulnerability-dataset |
| 4 | +literature (CVEfixes, BigVul, Devign, CrossVul, DiverseVul, PrimeVul, and Croft |
| 5 | +et al.'s data-quality framework). Numbers are for the current snapshot |
| 6 | +(n = 2,225 curated rows). |
| 7 | + |
| 8 | +## Snapshot |
| 9 | + |
| 10 | +| dimension | value | |
| 11 | +|---|---| |
| 12 | +| rows | 2,225 (A_authoritative 235 · B_corroborated 1,573 · C_candidate 417) | |
| 13 | +| layers | execution 1,259 · consensus 966 | |
| 14 | +| languages | Go 945 · Rust 419 · Nim 269 · Java 235 · TypeScript 225 · C# 130 | |
| 15 | +| rated severity | **6.4%** · carries a CVE/GHSA id **4.9%** | |
| 16 | +| top root causes | missing_input_validation 522 · resource_exhaustion 340 · race_condition 217 · unhandled_error/nil 208 · integer_overflow 185 · consensus_divergence 174 | |
| 17 | +| top attack paths | malformed_input 926 · crafted_state 415 · malicious_p2p_message 241 · malicious_attestation 174 | |
| 18 | +| fix size | median **45 LOC**, 41% ≤30 LOC · median **2 files**, **43% single-file** | |
| 19 | + |
| 20 | +## 1. The silent-fix majority is the point (not a bug) |
| 21 | + |
| 22 | +**Only 6.4% of curated fixes carry a rated severity and 4.9% carry a CVE/GHSA |
| 23 | +id.** So **~94% shipped silently** — no advisory, often a vague message. This |
| 24 | +quantifies, for Ethereum clients specifically, the phenomenon VulFixMiner and |
| 25 | +Sawadogo et al. describe generally. |
| 26 | + |
| 27 | +*Implication vs prior datasets.* CVE-anchored corpora (**CVEfixes**, **BigVul**) |
| 28 | +start from an advisory and walk to the fix, so by construction they can only see |
| 29 | +the ~5–6% advisory-linked slice. This corpus is built the other way — surface the |
| 30 | +silent majority via multi-signal mining — so it is complementary to, not a subset |
| 31 | +of, CVE-anchored datasets. |
| 32 | + |
| 33 | +## 2. The vulnerability profile is availability-first, and protocol-specific |
| 34 | + |
| 35 | +Root causes are dominated by **input-validation gaps, resource exhaustion, |
| 36 | +races, nil/unhandled errors, integer overflow, and consensus divergence**; |
| 37 | +attack paths are dominated by **malformed input, crafted state, and malicious |
| 38 | +p2p / attestation messages**. The modal bug is *"untrusted network input crashes |
| 39 | +or diverges the node"* — an **availability / consensus** class. |
| 40 | + |
| 41 | +*Implication.* This differs sharply from the memory-corruption / injection profile |
| 42 | +that dominates C/C++ datasets (BigVul, Devign are largely CWE-119/787/476). Two |
| 43 | +classes here are essentially **absent from generic datasets**: `consensus_divergence` |
| 44 | +(chain split / invalid-block acceptance) and DoS-via-p2p. A detector trained only |
| 45 | +on generic CWE data would be blind to the highest-severity Ethereum-specific |
| 46 | +class. This argues for domain-specific corpora, echoing CrossVul/DiverseVul's |
| 47 | +finding that distribution shift across domains degrades transfer. |
| 48 | + |
| 49 | +## 3. Fixes are surgical — which supports the counterfactual use-case |
| 50 | + |
| 51 | +**43% touch a single file, 41% change ≤30 LOC, median 45 LOC.** Security fixes |
| 52 | +being small and localized is exactly the prior that VulFixMiner / GraphSPD exploit, |
| 53 | +and it matters for this corpus's stated purpose — *"given the pre-fix state, would |
| 54 | +the tool have caught it?"*: a tightly-scoped diff + `introduced_in_commit` gives a |
| 55 | +clean counterfactual boundary. (The mean of 298 LOC is skewed by a few large |
| 56 | +refactor-bundled fixes — median is the honest centre.) |
| 57 | + |
| 58 | +## 4. Rare axis: one spec, eleven implementations, six languages |
| 59 | + |
| 60 | +Most vuln datasets are single-language (usually C/C++) and single-project or |
| 61 | +project-agnostic. This corpus is **multi-language (6) × multi-implementation (11) |
| 62 | +of one protocol**. Because all clients implement the *same* consensus/execution |
| 63 | +spec, the **same logical vulnerability can recur across languages** (and the |
| 64 | +`label` area is the language-agnostic join key). That enables studies generic |
| 65 | +datasets can't support: cross-implementation recurrence, language-specific bug |
| 66 | +proneness for an identical spec, and transfer across implementations. This is the |
| 67 | +diversity dimension **DiverseVul** and **CrossVul** argue reduces overfitting — |
| 68 | +here obtained within a single, well-specified domain. |
| 69 | + |
| 70 | +## 5. Data quality, by Croft et al.'s dimensions |
| 71 | + |
| 72 | +- **Accuracy (label correctness).** Multi-signal gate + `authority_tier` + an |
| 73 | + LLM classifier validated at ~0.90 precision; labels are *not* human-verified |
| 74 | + (see [`limitations.md`](./limitations.md)). The tiering makes the |
| 75 | + accuracy/coverage trade-off explicit rather than hidden in a single noisy label |
| 76 | + — the direction **PrimeVul** advocates after showing BigVul/Devign labels are |
| 77 | + substantially noisy. |
| 78 | +- **Uniqueness.** De-duplicated by `fix_commit` within a client (108 removed); |
| 79 | + only 2 commits are shared across clients (fork-inherited). Duplication is the |
| 80 | + #1 metric-inflation risk **PrimeVul** and **Croft et al.** flag; it is handled. |
| 81 | +- **Consistency.** One schema across 11 heterogeneous sources (advisory / stealth |
| 82 | + PR / commit / release / CVE / OSV / RustSec). |
| 83 | +- **Currentness.** Freshly crawled (2026), including the newest forks |
| 84 | + (deneb→fulu/gloas, cancun→osaka) — where most datasets lag years behind. |
| 85 | + |
| 86 | +## 6. Selection under a <1% base rate |
| 87 | + |
| 88 | +Security fixes are a fraction of a percent of commits (the "needle in a haystack" |
| 89 | +of VulFixMiner). The pipeline responds with a **cheap high-recall pre-filter → |
| 90 | +gate → LLM classifier** cascade rather than a blind full-commit scan (measured at |
| 91 | +~18 h with precision collapse). The `authority_tier` / `n_signals` columns let a |
| 92 | +consumer pick their point on the recall/precision curve — treating selection as a |
| 93 | +first-class, tunable step instead of a fixed threshold. |
| 94 | + |
| 95 | +## 7. It is a *corpus*, not a ready-made benchmark |
| 96 | + |
| 97 | +**PrimeVul**'s central lesson is that naive splits leak: near-duplicate and |
| 98 | +temporally-entangled samples inflate reported model performance. This dataset is a |
| 99 | +*corpus* — no train/test split is shipped. A consumer building a benchmark from it |
| 100 | +**must** add a temporal and/or by-client split (and treat the fork-shared commits |
| 101 | +and the recurring cross-implementation fixes as leakage risks) to get an honest |
| 102 | +generalization estimate. |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +*Reproduce these numbers from `data/ethereum_vulns.parquet`; see |
| 107 | +[`BUILD_REPORT.md`](./BUILD_REPORT.md) for coverage and [`limitations.md`](./limitations.md) |
| 108 | +for caveats.* |
0 commit comments