Standing approvals: the use count saturates (v0.16.1) #20
Reference in New Issue
Block a user
Delete Branch "fix/standing-count"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by an independent read-only review of PR #19.
What:
signing_signcounted a standing approval's use with+= 1.usesis not bounded when a vault is read, so a stored count of u64::MAX made the next standing signature panic in a debug build (after the audit entry was written, before the signature was returned) and wrap to 0 in release. Nowsaturating_add. Reaching it needs the vault key.Test:
a_rule_whose_count_is_at_its_end_still_signs(unit, security.rs). Not seen red: the panic exists only in debug builds and the suite was run in release. Workspace: 241 passed, 0 failed.Self-review: one line of behaviour; version 0.16.1. Other findings of that review are in the app (mnovak/Custos), not here. Not changed: on a hands-off vault an unattended signature counts as the key having signed before; SIGNING.md says
approvedentries count, which is what the code does.