Skip to content

[BUG] bchunk does not use ECC data in mode1/2352 data to correct errors when converting to iso #18

@1dolla

Description

@1dolla

A lot of (historical, if not current) CD ripping software will, or could by configuration (e.g. CDRWIN), rip a CD into a mode1/2352 bin/cue set and ignore any errors it encountered. This could be for the purpose of ripping game CDs with intentionally corrupt sectors.

A lot of regular bin/cue sets without any such copy protection concerns have been distributed with unintentional ripping errors. Most virtual drive software will gracefully use the ECC data in such bin/cue sets to correct errors on-the-fly when the image is mounted. However, if a software converts such bin/cue sets to formats without ECC data (e.g. bin/cue 2048, nrg, iso) and simply discards ECC data when converting, it will create corrupted image files.

This is apparently the case with bchunk.

E.g.:

$ bchunk regular-cd-mode-1-2352.bin regular-cd-mode-1-2352.cue good
 </snip>
 1: good.iso  656/656  MB  [********************] 100 %
$ echo $?
0
$ sudo dd if=/dev/disk0 of=regular-cd-mode-1-2352.bin bs=1 count=1 seek=200000000 conv=notrunc
1+0 records in
1+0 records out
1 byte copied, 0.014703 s, 0.1 kB/s
$ bchunk regular-cd-mode-1-2352.bin regular-cd-mode-1-2352.cue bad
 </snip>
 1: bad.iso  656/656  MB  [********************] 100 %
$ echo $?
0
$ diff good.iso bad.iso
Binary files good.iso and bad.iso differ

No error messages are printed, exit codes are good, everything seemingly is good, but the dump is corrupt.

Cheers :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions