Skip to content

fuzz: add Datalog parser and expression evaluator fuzz targets #213

Closed

Description

@adityamukho

Source

Extracted from the reliability audit snippet: malicious/property-style tests, fuzz tests, randomized inputs, parser/evaluator catch-alls.

Programmatic test scope

Add fuzz targets for Datalog parsing and expression evaluation.

Targets to cover

  • Datalog parser input bytes/string corpus.
  • Expression clauses, arithmetic, predicates, regex predicates, bind slots.
  • Nested not, not-join, or, or-join, rules, aggregates, and window syntax.

Acceptance criteria

  • Fuzzing rejects invalid input with errors instead of panics.
  • No unbounded allocation on malformed or deeply nested input.
  • Add seed corpus entries for past parser/security edge cases.
  • Document the local command and optional CI/nightly workflow.

Activity

  1. added
    enhancementNew feature or request
    rustPull requests that update rust code
    securitySecurity vulnerability
    dosDenial of service risk
    stabilityStability/panic issue
    on May 1, 2026
  2. adityamukho commented on May 2, 2026

    @adityamukho
    CollaboratorAuthor

    Audit finding: The parser has confirmed unwrap() panics on number overflow at parser.rs:151-174. parse_number() collects digits without length limit, then .parse::<i64>().unwrap() panics on overflow. Input like 99999999999999999999 crashes the library.

    This is a concrete DoS vector — especially relevant given Minigraf targets AI agent use cases where inputs are LLM-generated (prone to producing overflow values). The fix will land separately, but fuzz targets in this issue's scope would prevent regression.

  3. added a commit that references this issue on May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dosDenial of service riskenhancementNew feature or requestrustPull requests that update rust codesecuritySecurity vulnerabilitystabilityStability/panic issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions