According to the project's documentation, only the owner may set and retrieve their secret. However, there exists mismatch between set_secret()
and get_secret()
:
set_secret()
writes the Vault resource under the caller’s address
get_secret
reads the Vault from a hardcoded address @owner
This result in read DoS if fixed @owner
is differ from the caller of set_secret
Likelihood: High
unless the caller’s address exactly matches the bound @owner
, it fails
Impact: High
Mismatch between storage and retrieval
Secrets may appear “missing” even though they were stored
Add the following test, then run the command: aptos move test -f test_read_write_mismatch
Align read and write to the same address authority:
Single-owner design: Enforce signer::address_of(caller) == @owner
inside set_secret
, and always write/read from @owner. This guarantees consistent access for the designated owner.
Multi-user design: Remove the hardcoded @owner
. Instead, use signer::address_of(caller)
consistently for both writing and reading, and consider adding an owner
field inside the Vault resource for explicit ownership tracking.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.