Skip to content

Conversation

healthykim
Copy link
Contributor

@healthykim healthykim commented Jul 14, 2025

This PR fixes an issue in the tx_fetcher DoS prevention logic where the code keeps the overflow amount (want - maxTxAnnounces) instead of the allowed amount (maxTxAnnounces - used). The specific changes are:

  • Correct slice indexing in the announcement drop logic
  • Extend the overflow test case to cover the inversion scenario

@healthykim healthykim requested a review from rjl493456442 as a code owner July 14, 2025 12:03
Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@rjl493456442 rjl493456442 merged commit e9e12a9 into ethereum:master Jul 14, 2025
4 of 5 checks passed
@rjl493456442 rjl493456442 added this to the 1.16.2 milestone Jul 14, 2025
howjmay pushed a commit to iotaledger/go-ethereum that referenced this pull request Aug 27, 2025
This PR fixes an issue in the tx_fetcher DoS prevention logic where the
code keeps the overflow amount (`want - maxTxAnnounces`) instead of the
allowed amount (`maxTxAnnounces - used`). The specific changes are:

- Correct slice indexing in the announcement drop logic
- Extend the overflow test case to cover the inversion scenario
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants