You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, while fuzzing I found a binary file (probably ill-formed) that takes around 10 minutes to be parsed on my machine. But the file is only 396 bytes. This might not be a bug and just an expected outcome of the binary lying about its data, but it would be nice if this can be avoided.
What I've discovered if this can help is that this while loop in MachOFile::parse is looping all the time over commands.next()
And the next implementation of LoadCommandIterator is decrementing its inner variable ncmds by 1 each iteration and returning None when it's 0. But the thing is the initial value of ncmds is 3 992 977 412 😮
Hello, while fuzzing I found a binary file (probably ill-formed) that takes around 10 minutes to be parsed on my machine. But the file is only 396 bytes. This might not be a bug and just an expected outcome of the binary lying about its data, but it would be nice if this can be avoided.
What I've discovered if this can help is that this while loop in
MachOFile::parse
is looping all the time overcommands.next()
object/src/read/macho/file.rs
Lines 58 to 69 in a3706b5
And the
next
implementation ofLoadCommandIterator
is decrementing its inner variablencmds
by 1 each iteration and returning None when it's 0. But the thing is the initial value ofncmds
is3 992 977 412
😮Here is the file to reproduce: test.zip
The text was updated successfully, but these errors were encountered: