Vote timer callback uses potentially stale timer round instead of actual vote round, causing vote misrouting
A vote timer callback used the timer's round rather than the stored vote's actual round when computing vote recipients, so a stale timer firing after the node advanced several rounds could send a vote to the wrong leaders. This could slow or block quorum certificate formation for a round, degrading liveness.
ZeroEx Follow with JuggerNaut63 and minato7namikazi
Originally disclosed on Code4rena
Submitted by ZeroEx, also found by JuggerNaut63 and minato7namikazi
bft/monad-consensus-state/src/lib.rs #L1061
In handle_vote_timer(), when a vote timer fires, the callback extracts the stored vote but uses the timer’s round parameter instead of the vote’s actual round when calling send_vote_and_reset_timer():
pub fn handle_vote_timer(
&mut self,
round: Round, // ← Timer's round
) -> Vec<ConsensusCommand<...>> {
let Some(OutgoingVoteStatus::VoteReady(v)) = self.consensus.scheduled_vote else {
self.consensus.scheduled_vote = Some(OutgoingVoteStatus::TimerFired);
return vec![];
};
self.send_vote_and_reset_timer(round, v) // ← Uses timer's round, not v.round
}
In send_vote_and_reset_timer(), vote recipients are computed from the passed round parameter:
let next_leader = get_leader(round + Round(1)); // ← Derives from parameter
let current_leader = get_leader(round); // ← Derives from parameter
Vote timers are scheduled one round ahead when sending votes:
cmds.push(ConsensusCommand::ScheduleVote {
round: round + Round(1), // ← Schedules for next round
duration: vote_pace,
});
Trigger Scenario
- Node votes on round R, schedules timer for round R+1
- Before timer fires, node rapidly advances through R+1 → R+2 (via QC messages and/or consecutive proposals)
- Node processes proposal for R+2, updates
scheduled_vote = VoteReady(v_R+2) - Stale timer for R+1 fires
handle_vote_timer(R+1)extracts votev_R+2but passesround = R+1tosend_vote_and_reset_timer()
Impact
Vote Misrouting:
-
Advance by 2 rounds: Vote sent to current leader but not next leader
- Next-round leader (R+3) never receives vote for R+2
- Slows QC(R+2) formation → increases timeout risk
-
Advance by 3+ rounds (more severe): Vote sent to neither current nor next leader
- Current leader (R+N) doesn’t receive vote for R+N
- Completely blocks QC formation for round R+N
- Forces timeout and TC generation
- Severely degrades liveness
Cascading Timer Drift:
- Next timer scheduled for round R+2 (should be R+3)
- Subsequent stale timers compound the misrouting
Can occur during fast network conditions, burst QC message processing, or catch-up after brief partitions, where rapid round advancement causes stale vote timers to fire after consensus has progressed multiple rounds ahead.
View detailed Proof of Concept
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The handler passed the timer's round into the send function instead of the round stored on the scheduled vote, so recipient leaders were derived from a stale round.
Impact
Votes could be sent to the wrong leaders, slowing QC formation when two rounds ahead and potentially blocking QC formation entirely when three or more rounds ahead, forcing timeouts and degrading liveness.
What the attacker needed
Rapid round advancement; stale vote timer fires after progress
How it was found
- Node votes on round R and schedules a vote timer for round R+1.
- Before the timer fires, the node advances rapidly through R+1 to R+2 via QC messages or consecutive proposals.
- The node processes the R+2 proposal and stores a vote ready for R+2.
- The stale timer for R+1 fires and the handler extracts the R+2 vote but passes round R+1.
- The vote is sent to leaders derived from R+1 rather than R+2, misrouting it.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In this consensus protocol, nodes vote on rounds and a timer reminds them to send a scheduled vote. The code took the round number from the timer instead of from the vote itself, so if the node moved ahead quickly the reminder pointed at an old round. The vote then went to the wrong leaders, which can stall the agreement process.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.