Skip to content

[audit][P17] Bulk and commitment proof generation consumes limits for unselected range gaps #865

Description

@QuantumExplorer

Audit group: P17. Classification: correctness. Provisional severity: medium.

GroveDB’s bulk proof generator deducts an enclosing range span from the global limit, while lower proof generation uses the normalized union of selected ranges. Gaps can consume result budget; empty or reversed selections can also reach unsafe subtraction. Commitment-tree generation shares the path.

Use normalized selection cardinality or actual returned result count, handle empty selections explicitly, and check arithmetic before consuming limits.

Closed #688/#729 address completed-chunk content length, while closed #693 concerns count-size arithmetic. Neither is the same normalized-selection accounting cause. PR #415 and #786 provide related completeness and canonical page functionality but do not establish this general query contract.

Source-based assessment only; this audit did not reproduce the reported behavior at runtime.

Validation to complete

  • Compare generated results and remaining sibling-query limits for bounded ordinary disjoint, empty, and reversed selections in bulk and commitment trees.

Related tracking: issue #688 (closed), issue #693 (closed), PR #415 (merged), PR #786 (merged), PR #729 (closed).

Scope: saved GroveDB worktree with revision context 2fa0f133877420a0d9c91ba7bc51b1775ab8c783. This report does not establish that current develop or any deployed application is affected. Focused runtime validation remains outstanding.

Audit source and canonical finding identifiers

Source status: snapshot-backed (git_worktree); plain source locations are used because this is not a sealed commit-only scan.

Audited revision context: 2fa0f133877420a0d9c91ba7bc51b1775ab8c783.

The findings were manually reconciled from a preserved scan bundle. The native scan ended before final completion; these are provisional source-review findings, not a completed native scan certification.

Canonical finding ID: csf_497a52ea65bd1665d01d67cd

Primary fingerprint: codex-security/v1:sha256:7e1abf0a12bcf5980d1b1a88401f7381c0c7447ecfdacae7914c1d10edfda42b

Source locations:

  • Location (entrypoint): grovedb/src/operations/proof/generate.rs:3186-3264
  • Location (root_control): grovedb/src/operations/proof/generate.rs:3310-3350
  • Location (root_control): grovedb/src/operations/proof/generate.rs:3696-3785
  • Location (root_control): grovedb-bulk-append-tree/src/proof/mod.rs:36-105
  • Location (root_control): grovedb-bulk-append-tree/src/proof/mod.rs:242-310

Activity

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

    area:proofs-queriesP groups: proof generation, verification, completeness and query semantics.audit:2026-09Reconciled September 2026 GroveDB audit; audited worktree at 2fa0f133.audit:needs-validationSaved source evidence reviewed; focused runtime and deployment validation outstanding.bugSomething isn't workingseverity:medium-provisionalMedium impact in the audited scenario; provisional static assessment.type:correctnessAudit reports incorrect library behavior or accounting without proven security impact.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions