-
Notifications
You must be signed in to change notification settings - Fork 75
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
possible DoS attack against PAR2 clients #31
Comments
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
[side note.. ⛵ |
par3 is similar to par2, but has some advantages it has smaller headers and uses another technique to create recovery files |
the sollution offered is not perfect but it will avoid a massive slowdown it could in some cases give false positives of missing blocks |
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
Issue #31 was reported as a problem whereby cache collision of crc32 values resulted in the calculation of md5 values at a large number of file positions for certain types of data files. The fix for issue #31 was to introduce code that would only only scan forwards 10 bytes whilst searching for a good datablock, and then skip the next blocksize-10 bytes before continuing searching. This code will never find blocks that are positioned earlier in the file than they should be, and will also never find blocks that are positioned more than 10 bytes later in the file than they should be. Issue #50 reported that a single byte erasure at the start of a data file resulted in the complete failure to find any good data block in the file. The fix for issue #50 is an improvement of the code intended to deal with issue #31 such that instead of only finding datablocks that are either exactly at the correct position in the file or no more than 10 bytes after the correct position: it will now (by default) check up to 64 bytes before and up to 64 bytes after the expected position of the next block (where the 'expected' position is calculated relative to the position where the last block was found). Additionally, two new commandline parameters were added to enable this code to be tuned: -N : No data skipping (every byte of data will be scanned for blocks) -S<n> : Skip leaway n bytes (check for the next block within +/- n bytes of the expected position before skipping forward) Finally, where the code would previously skip forward a whole block if it found data that it thinks is a duplicate of a block that has already been found, it will now start scanning from that position.
I found that this issue was not solved in recent version. But, the problem had been solved at year 2014. So, something change might happen to remove the solution. I put the sample set of PAR2 files and source files (testCollision_2014-05-06.zip) in "Tool" folder on OneDrive. They are same as old data set, which were refered in the first post. par2cmdline v0.8.1 fails (freeze) at verifying these three cases. |
This is a forwarded issue from multipar
check if the problem exists in par2cmdline and fix if needed
The text was updated successfully, but these errors were encountered: