Skip to content

Add WorkbookEvaluator context-aware fuzz target#1025

Open
vishalcoc44 wants to merge 3 commits intoapache:trunkfrom
vishalcoc44:add-workbook-evaluator-fuzzer
Open

Add WorkbookEvaluator context-aware fuzz target#1025
vishalcoc44 wants to merge 3 commits intoapache:trunkfrom
vishalcoc44:add-workbook-evaluator-fuzzer

Conversation

@vishalcoc44
Copy link
Contributor

@vishalcoc44 vishalcoc44 commented Mar 5, 2026

This PR adds a context-aware fuzz target for the Apache POI WorkbookEvaluator engine to the poi-fuzz module.

This fuzzer was developed as part of Google's OSS-Fuzz integration (see google/oss-fuzz#14987) and is being upstreamed

Technical Approach

  • Context-Aware Strategy: Pre-populates a 20×20 Excel data grid with a diverse mix of numbers, negative values, strings, booleans, and error codes so that referential formulas (SUM, VLOOKUP, INDEX, MATCH, etc.) exercise real evaluation paths instead of fast-failing on empty references.
  • Guided Input Generation: Uses a dictionary of 60 complex Excel function signatures to steer the fuzzer toward deep calculation branches in the WorkbookEvaluator.
  • Coverage Impact: In local testing, this increased code coverage within the WorkbookEvaluator from 19 lines to over 2,200 lines (~11,700% increase).
  • Security Alignment: Expected exceptions (FormulaParseException, NotImplementedException, etc.) are suppressed while internal logic flaws (NPE, OOB) bubble up as findings.

Placement

File added to poi-fuzz/src/main/java/org/apache/poi/fuzz/WorkbookEvaluatorFuzzer.java

@vishalcoc44
Copy link
Contributor Author

@centic9

@vishalcoc44
Copy link
Contributor Author

@centic9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants