Skip to content

[audit][P15] Regular query proof orientation can produce an incorrect verified absence #863

Closed

Description

@QuantumExplorer

Audit group: P15. Classification: security. Provisional severity: high.

Regular query verification advances ranges using the caller’s direction, while the proof interpreter checks ordering according to its supplied operation family. Without agreement between them, the verifier can make an incorrect absence or completeness decision even when the reconstructed root is authentic.

Require a homogeneous operation orientation matching the actual query before direction-sensitive bound checks. Preserve the separately justified synthesized-path handling.

Merged PR #818 documents the same direction-sensitive family for synthesized path levels and fixes only that scope; the audited snapshot includes that fix. This group concerns actual query levels. PR #851 changes synthesized merge-body direction and does not establish the regular verifier invariant.

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

Validation to complete

  • Compare ordinary ascending/descending query results and absence outcomes with trusted reads, and keep synthesized subset-path compatibility covered separately.

Limits and existing work

  • Provisional high with source medium/high disagreement; dedicated aggregate/count-offset verifiers are not independently established as affected.

Related tracking: PR #818 (merged), PR #851 (merged), PR #801 (merged).

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_69080cc070b3cc3f9fc7ac64

Primary fingerprint: codex-security/v1:sha256:d448bf232ea19ce083e00e97a4a369c140bef0f4e052cdf3a07efead0dd6452d

Canonical finding ID: csf_bbd205656fa6cd951c1d0dd8

Primary fingerprint: codex-security/v1:sha256:d3de0c3528e9cb80d72d5b48705668d4af63c2532815644cabadd8a6dd29c2be

Canonical finding ID: csf_eb624c75bb3e3df3843d758f

Primary fingerprint: codex-security/v1:sha256:1e6eb9d395b992bf5aaef0cb7bda6619056ca3280b9ad87a387d9484c3938942

Source locations:

  • Location (entrypoint): merk/src/proofs/query/verify.rs:149-164
  • Location (root_control): merk/src/proofs/query/verify.rs:282-313
  • Location (propagation): merk/src/proofs/tree.rs:819-832
  • Location (propagation): merk/src/proofs/tree.rs:863-876
  • Location (root_control): grovedb/src/operations/proof/verify.rs:1431-1455
  • Location (outcome): merk/src/proofs/query/verify.rs:654-660
  • Location (entrypoint): grovedb/src/operations/proof/aggregate_common.rs:191-205
  • Location (entrypoint): grovedb/src/operations/proof/indexed_axis/verify.rs:626-640
  • Location (entrypoint): grovedb/src/operations/proof/verify.rs:988-1007
  • Location (root_control): merk/src/proofs/query/verify.rs:151-176
  • Location (propagation): merk/src/proofs/query/verify.rs:282-311
  • Location (propagation): merk/src/proofs/tree.rs:820-838
  • Location (propagation): merk/src/proofs/tree.rs:866-884
  • Location (entrypoint): grovedb/src/operations/proof/verify.rs:1429-1470
  • Location (sink): merk/src/proofs/query/verify.rs:665-687
  • Location (root_control): merk/src/proofs/query/verify.rs:158-206
  • Location (sink): merk/src/proofs/query/verify.rs:282-295
  • Location (entrypoint): grovedb/src/operations/proof/verify.rs:1431-1463
  • Location (propagation): merk/src/proofs/tree.rs:845-876

Activity

  1. added
    bugSomething isn't working
    audit:2026-09Reconciled September 2026 GroveDB audit; audited worktree at 2fa0f133.
    area:proofs-queriesP groups: proof generation, verification, completeness and query semantics.
    type:securityAudit reports a security property failure; deployment impact needs validation.
    severity:high-provisionalHigh impact in the audited scenario; provisional static assessment.
    audit:needs-validationSaved source evidence reviewed; focused runtime and deployment validation outstanding.
    on Sep 6, 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

    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:high-provisionalHigh impact in the audited scenario; provisional static assessment.type:securityAudit reports a security property failure; deployment impact needs validation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions