Source: par2cmdline
Version: 0.6.8-1
Severity: grave

Hi,

par2 0.6.8 introduces a major regression from 0.6.7; it crashes when
parsing certain kinds of damaged file sets.  I've attached a test case
that reproduces the issue.  This was found using the bup test suite; see
related Debian bug #759930.

Here is the output of 0.6.7's par2verify running on the damaged file
set:

    edmonds@chase{0}:~/debian/tmp/par2-0.6.8-crash$ par2verify 
pack-ea5f7f848340980493ed39f5b7173d956c680e43.par2
    Loading "pack-ea5f7f848340980493ed39f5b7173d956c680e43.par2".
    Loaded 6 new packets
    Loading "pack-ea5f7f848340980493ed39f5b7173d956c680e43.vol000+200.par2".
    Loaded 200 new packets including 200 recovery blocks
    Loading "pack-ea5f7f848340980493ed39f5b7173d956c680e43.par2".
    No new packets found

    There are 2 recoverable files and 0 other files.
    The block size used was 4 bytes.
    There are a total of 329 data blocks.
    The total size of the data files is 1316 bytes.

    Verifying source files:

    Target: "pack-ea5f7f848340980493ed39f5b7173d956c680e43.idx" - damaged. 
Found 266 of 275 data blocks.
    Target: "pack-ea5f7f848340980493ed39f5b7173d956c680e43.pack" - damaged. 
Found 3 of 54 data blocks.

    Scanning extra files:


    Repair is required.
    2 file(s) exist but are damaged.
    You have 269 out of 329 data blocks available.
    You have 200 recovery blocks available.
    Repair is possible.
    You have an excess of 140 recovery blocks.
    60 recovery blocks will be used to repair.
    edmonds@chase{1}:~/debian/tmp/par2-0.6.8-crash$ 

Here is the output of 0.6.8's par2verify running on the damaged file
set:

    edmonds@chase{0}:~/debian/tmp/par2-0.6.8-crash$ par2verify 
pack-ea5f7f848340980493ed39f5b7173d956c680e43.par2 
pack-ea5f7f848340980493ed39f5b7173d956c680e43.vol000+200.par2
    Loading "pack-ea5f7f848340980493ed39f5b7173d956c680e43.par2".
    Loaded 6 new packets
    Loading "pack-ea5f7f848340980493ed39f5b7173d956c680e43.vol000+200.par2".
    Loaded 200 new packets including 200 recovery blocks
    Loading "pack-ea5f7f848340980493ed39f5b7173d956c680e43.par2".
    No new packets found
    Loading "pack-ea5f7f848340980493ed39f5b7173d956c680e43.vol000+200.par2".
    No new packets found

    There are 2 recoverable files and 0 other files.
    The block size used was 4 bytes.
    There are a total of 329 data blocks.
    The total size of the data files is 1316 bytes.

    Verifying source files:

    par2verify: filechecksummer.cpp:85: bool FileCheckSummer::Jump(u64): 
Assertion `distance <= blocksize' failed.
    zsh: abort (core dumped)  par2verify 
pack-ea5f7f848340980493ed39f5b7173d956c680e43.par2 
    edmonds@chase{134}:~/debian/tmp/par2-0.6.8-crash$ 

I've attached an archive of the damaged file set.

I would guess that this upstream commit is the culprit:

    
https://github.com/BlackIkeEagle/par2cmdline/commit/58c973496b21608d54246fd9c859bf8ccf0a9602

-- 
Robert Edmonds
edmo...@debian.org

Attachment: par2-0.6.8-crash.tar.gz
Description: application/gzip

Reply via email to