TL;DR
Automated security patch backporting tools often boast success rates over 80%, but these figures are frequently inflated by narrow datasets and inconsistent evaluation metrics. This paper introduces Porting Benchmark, a unified dataset of 1,234 diverse backporting cases, revealing that tool performance drops sharply (down to 24%) on structurally complex patches and that static code metrics often fail to predict whether a patch actually works in execution.
What Problem Does This Paper Address?
When a security vulnerability is fixed in a software project, that fix must be "backported" to older maintained versions, long-term support (LTS) branches, or downstream forks. Doing this manually is slow, error-prone, and requires a deep understanding of evolving codebases.
While a growing line of automated tools—ranging from classic program analysis to Large Language Model (LLM) agents—claim high success rates, they have historically been evaluated in isolation. Each tool uses its own dataset and incompatible success criteria (e.g., compilation success vs. text edit distance). This creates a massive comparability and generalization gap: we don't actually know how well these tools generalize to diverse, real-world scenarios like cross-repository forks or structurally divergent codebases.
Methods
The authors address these gaps by establishing a unified evaluation framework to systematically compare five state-of-the-art tools (FixMorph, TSBPort, Mystique, PPatHF, and PortGPT).
The overview of their unified benchmark evaluation workflow is illustrated below:
To ensure a fair comparison, the authors:
- Standardized the Pipeline: They mapped each tool's native execution granularity (hunk, function, or file) to a shared coordinate space.
- Five-Level Validation Hierarchy: They introduced a strict validation ladder ranging from exact text matches (L1) to structural consistency checks (L2–L5), followed by a rigorous manual verification protocol to assess "Semantic Success" (S-Succ).
- Executable Validation: For a subset of cases, they went beyond static code analysis by executing the patched software against actual Proof-of-Concept (POC) exploits and developer test suites to verify if the patch truly remediated the vulnerability without breaking intended behavior.
Datasets
The authors constructed Porting Benchmark, which is split into two primary datasets:
- Replication Dataset (600 cases): A curated, deduplicated blend of data from the original tool papers used to isolate metric-driven performance differences.
- Evaluation Dataset (634 cases): A brand-new dataset consisting exclusively of post-2023 vulnerabilities (minimized for LLM training data leakage) across 80 target repositories. It spans three distinct scenarios: cross-version, cross-branch, and cross-repository.
The characteristics and structural complexity of the Evaluation Dataset are broken down here:
Additionally, they curated a highly valuable Executable Subset (45 cases) equipped with fully reproducible build environments, developer tests, and working POC exploit scripts.
Key Insights and Ideas
- The Illusion of 80%+ Success: Previous high success rates were largely artifacts of loose metrics and homogeneous testing environments. Under a unified, strict protocol, performance drops significantly.
- Structure is the Ultimate Bottleneck: Tools are relatively good at adjusting line numbers (Type-II complexity) or renaming variables (Type-III), but they struggle immensely with structural changes (Type-IV), such as when a patch requires refactoring control flows or adapting to completely missing APIs in the target version.
- The Static-to-Executable Gap: Passing a static code similarity check does not guarantee security. The authors discovered a "benchmark-to-reality gap" where patches that matched the reference code perfectly still failed in execution due to residual integration issues, while some structurally divergent patches successfully blocked exploits.
Key Results
- Performance Drops Under Aligned Metrics: On the Replication Dataset, tools like Mystique saw their commit-level success rate plummet from a claimed 92.4% to just 14.7%. PortGPT and TSBPort remained the top performers but still experienced noticeable drops.
- Complexity Degradation: On the new Evaluation Dataset, the best commit-level success rate fell from 85.2% on Type-I (identical) patches to just 24.0% on Type-IV (structural change) patches.
- Dominant Failure Modes: A root-cause analysis of 120 failed attempts revealed that patch construction/localization failure (45.0%) and non-local dependency propagation failure (39.2%) (e.g., needing to modify multiple functions across a call chain) are the primary reasons modern tools fail.
Limitations and Future Work
The authors note several limitations:
- The benchmark is currently restricted to C/C++ security patches, meaning the findings may not immediately generalize to memory-safe languages like Java or Go.
- The Executable Subset is small (45 cases) because creating reproducible historical build environments and reliable exploit scripts is incredibly labor-intensive.
Future Directions: Next-generation tool designers need to move away from simple localized text generation. Instead, future tools must focus on achieving broader target API awareness and mastering multi-file, non-local dependency propagation.
Summary updated