Skip to content

fix: reject duplicate notes from get_notes#24716

Draft
AztecBot wants to merge 1 commit into
nextfrom
cb/kernels-audit-remediation-982-note-getter-duplicates
Draft

fix: reject duplicate notes from get_notes#24716
AztecBot wants to merge 1 commit into
nextfrom
cb/kernels-audit-remediation-982-note-getter-duplicates

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

get_notes validated each hinted note independently, so a malicious witness could return the same note multiple times in one call. This change rejects duplicate note existence requests during hint confirmation, which is the narrow fix for preventing duplicated returned notes.

Fix

  • Track each confirmed (note_hash, contract_address) pair while confirming hinted notes and reject repeats.
  • Add a focused regression that constructs duplicate valid hinted notes and expects confirmation to fail.

Testing

  • ../../noir/noir-repo/target/debug/nargo test --package noir_aztec --exact note::note_getter::test::confirm_notes_rejects_duplicate_hinted_note --silence-warnings --test-threads 1 failed before the fix with Test passed when it should have failed
  • ../../noir/noir-repo/target/debug/nargo test --package noir_aztec --exact note::note_getter::test::confirm_notes_rejects_duplicate_hinted_note --silence-warnings --test-threads 1
  • ../../noir/noir-repo/target/debug/nargo fmt --package noir_aztec
  • ../../noir/noir-repo/target/debug/nargo test --package noir_aztec --no-run --silence-warnings
  • git diff --check

Issues

  • Closes AztecProtocol/aztec-claude#982 — get_notes can return one note multiple times

Created by claudebox · group: kernels-audit-remediation

@AztecBot AztecBot added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR. labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant