Skip to content

fix: fix RLP Iterator Infinite Loop issue#3586

Merged
allformless merged 1 commit into
bnb-chain:developfrom
flywukong:fix-security
Mar 10, 2026
Merged

fix: fix RLP Iterator Infinite Loop issue#3586
allformless merged 1 commit into
bnb-chain:developfrom
flywukong:fix-security

Conversation

@flywukong

@flywukong flywukong commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Description

mege upstream fixed security issue: rlp: finalize listIterator on parse error (#33245)

Rationale

The listIterator.Next() could enter an infinite loop when readKind returns an error without advancing the iterator position. This is a P2P DoS vector for nodes in open networks.

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

…ops (#33245)

The list iterator previously returned true on parse errors without
advancing the input, which could lead to non-advancing infinite loops
for callers that do not check Err() inside the loop; to make iteration
safe while preserving error visibility, Next() now marks the iterator as
finished when readKind fails, returning true for the error step so
existing users that check Err() can handle it, and then false on
subsequent calls, and the function comment was updated to document this
behavior and the need to check Err().
@flywukong flywukong changed the base branch from master to develop March 10, 2026 07:55
@allformless allformless merged commit 3ed9709 into bnb-chain:develop Mar 10, 2026
10 of 11 checks passed
@allformless allformless added this to the 1.7.1 milestone Mar 11, 2026
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.

4 participants