← Lab /Software

Only 20 of 2,500 OpenVPN2 implicit conversion warnings are security-relevant

Only 20 of the roughly 2,500 implicit conversion warnings in OpenVPN2 are potentially exploitable, and none were actually exploitable.

Software Trail of Bits 25 Sep 2025 Tooling Prototype evidence

Published as “Taming 2,500 compiler warnings with CodeQL, an OpenVPN2 case study”

Why it matters

Most implicit conversion warnings in C are benign, and targeted static analysis can safely prune them, saving manual review effort.

Summary

The team built a custom CodeQL query to analyze all implicit integer conversions in OpenVPN2, which initially produced over 7,000 results. By iteratively adding filters-removing constant conversions, applying range analysis, modeling known-safe functions, and finally taint tracking-they reduced the set to 20 high-priority cases. Manual review of those 20 found no exploitable bugs, demonstrating that most warnings are benign and that the query can dramatically cut review effort. The evidence is based on a single real-world codebase and includes runtime trade-offs for deeper analysis.

What they found 2

  1. The custom CodeQL query reduced flagged implicit conversions from ~2,500 to 20 high-priority cases.

    “This final filter brought us down to just 20 high-priority cases for manual review.”

  2. No exploitable vulnerabilities were found among the remaining 20 cases.

    “After analyzing these remaining cases, we found that none were exploitable in OpenVPN2’s context.”

Caveats 5

  • The authors note that using IR-based RangeAnalysis "significantly increased the runtime of the query".
  • The analysis was performed only on the OpenVPN2 codebase, so results may not generalize.
  • Range analysis significantly increased query runtime.
  • Only evaluated on the OpenVPN2 codebase.
  • Interprocedural cases were handled heuristically, not exhaustively.

What’s new here 4

  • A new CodeQL query that isolates security-relevant implicit integer conversions in C code.
  • Iterative refinement steps combining constant filtering, range analysis, and taint tracking to cut false positives.
  • Domain-specific function models for OpenVPN2, the C standard library, and OpenSSL to improve analysis precision.
  • Open-source release of the query for reuse on other C projects.

In the news