Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add range check to signature index #5157

Merged
merged 1 commit into from
Oct 22, 2024
Merged

fix: Add range check to signature index #5157

merged 1 commit into from
Oct 22, 2024

Conversation

SamHSmith
Copy link
Contributor

@SamHSmith SamHSmith commented Oct 17, 2024

Context

The bug is triggered if a a peer is unregistered from the topology while Sumeragi Messages are still in flight. This
is the only place where we use and array index operation that can panic. It is very hard to write a test for this case
that is guaranteed to show the issue each time.

Closes #5104

Solution

  • Describe the approach taken to achieve the objective / resolve the issue.

Migration Guide (optional)

  • If this PR contains a breaking change relative to the main branch, provide an instruction on how affected parties might need to adapt to the change.

Review notes (optional)

  • For complex PRs, try to provide some information on how to approach the review more effectively.
  • For example, is there a natural order in which the affected files should be reviewed?

Checklist

  • I've read CONTRIBUTING.md.
  • (optional) I've written unit tests for the code changes.
  • All review comments have been resolved.
  • All CI checks pass.

@mversic
Copy link
Contributor

mversic commented Oct 18, 2024

what's the corresponding issue for this?

@0x009922
Copy link
Contributor

Linked it: #5104

@mversic mversic requested a review from 0x009922 October 21, 2024 09:22
@mversic mversic merged commit ae5eb8a into main Oct 22, 2024
13 of 14 checks passed
@mversic mversic deleted the range_check branch October 22, 2024 07:03
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.

[BUG] Sumeragi panics with "index out of bounds" message after unregistering a peer
3 participants