-
Notifications
You must be signed in to change notification settings - Fork 15
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
[Crash/Fuzzing] memory exhaustion / OOM when parsing invalid ENR string. #64
Comments
Similar bug has been found by @Daft-Wullie using beacon-fuzz. I'm pretty sure it's the same but I let you check with this reproducer: var discv5 = require("@chainsafe/discv5");
buf = Buffer.from("656e723a2d4b7534514147774f54395374716d7749354c486149796d494f346f6f464b664e6b456a576130663150384f73456c67426832496a622d4772445f2d623157346b635046635f5f5f5f5f5f676d6c6b676e5930676d6c7768424c663232346b63504663776d534a6332566a634449314e6d73786f514a78436e4536765f723a2d4b7534514147774f7832656b67595f756f45317274777a764754395374716d7749354c486149796d494f346f6f6d6c7768424c663232534a6332567934306d7139654436365866485042576749494e315a4843434436410a6a632749314e6d73786f514a78436e4536765f7832656b67595f756f45312a7274777a76477934306d7139654436365866485042576749494e315a4843434436410a", 'hex').toString()
console.log(buf)
discv5.ENR.decodeTxt(buf); |
7 tasks
Fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
During fuzzing with beaconfuzz, I found that the following input leads to a memory exhaustion failure (Out Of Memory - OOM). This issue will lead to a complete denial of service (DoS) of the nodejs and the server when trying to allocate to much memory.
Expected behavior
Should throw an
Error
since this enr string is invalid.zcli
reject this ENR recort string with the following message:Steps to Reproduce
oom_enr_lodestar.js:
Run:
Desktop (please complete the following information):
Ubuntu 18.04
0.2.4
v12.9.1
The text was updated successfully, but these errors were encountered: