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

Setban causes segfault on malformed IP #2750

Closed
CallMeFoxie opened this issue Mar 12, 2024 · 0 comments · Fixed by #2757
Closed

Setban causes segfault on malformed IP #2750

CallMeFoxie opened this issue Mar 12, 2024 · 0 comments · Fixed by #2757
Assignees
Labels
Milestone

Comments

@CallMeFoxie
Copy link

Bug Report

Current behavior
gridcoinresearchd crashes when given a wrong IP on setban command

Expected behavior
ban a remote

Steps to reproduce:

for peer in $(gridcoinresearchd getpeerinfo | jq '.[] | select(.subver=="/Halford:5.4.5/") | .addr' -r); do gridcoinresearchd setban $peer add 3600; done

the output is in format ip:port of the remotes, not just pure IPs, however this causes a segfault

63613064.639190] gridcoinresearc[12613]: segfault at 0 ip 000055e6fc7209b8 sp 00007feef77fc8f0 error 4 in gridcoinresearchd[55e6fc2e9000+648000]

however stripping the port part works fine

for peer in $(gridcoinresearchd getpeerinfo | jq '.[] | select(.subver=="/Halford:5.4.5/") | .addr' -r); do gridcoinresearchd setban $(echo $peer | cut -d':' -f1) add 3600; done

Gridcoin version
v.5.4.6.0

Machine specs

  • OS: Debian Buster
  • CPU: Xeon i7-3770k
  • RAM: 4GB
  • Disk size: 1TB
  • Disk Type (HD/SSD): HDD
@div72 div72 self-assigned this Mar 15, 2024
@jamescowens jamescowens added this to the Natasha milestone Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants