El Torito boot image corrupted by truncation

Bug #1266461 reported by TJ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ISO Master
Fix Released
Unknown
isomaster (Ubuntu)
Fix Released
High
David Johnson

Bug Description

El Torito Boot records are being truncated resulting in un-bootable ISO images.

Starting with two professionally mastered bootable DVD-ROMs I saved their boot images (4096 bytes) and added them to new newly created ISO images containing the same files.

I also opened one of the professional ISO images and then did Save As... without making any changes.

Both times, after saving, ISO Master and 'geteltorito' report the boot image size is now 2048 bytes.

Revision history for this message
TJ (tj) wrote :

The professionally mastered images I am working with are 4096 bytes in size consisting of 8 x 512-bytes sectors.

The bug is that ISO master assumes all boot sectors are 2048 bytes (4 sectors) and has hard-coded the sector-count value:

/******************************************************************************
* writeElToritoBootCatalog()
* Write the el torito boot catalog (validation entry and inital/default entry).
* Returns the offset where the boot record sector number should
* be written (7.3.1).
* */
int writeElToritoBootCatalog(VolInfo* volInfo,
                             bk_off_t* bootRecordSectorNumberOffset)

...
    /* sector count. i have yet to see a boot record with a sector count
    * that's not 4 */
    write721ToByteArray(&(buffer[38]), 4);

Here's the before and after results of simply cloning an 8-sector bootable image:

$ geteltorito en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso >/dev/null
Booting catalog starts at sector: 22
Manufacturer of CD: Microsoft Corporation
Image architecture: x86
Boot media type is: no emulation
El Torito image starts at sector 734 and has 8 sector(s) of 512 Bytes
Image has been written to stdout ....

$ isomaster
mangling
opening 'en_windows_7_professional_with_sp1_x64_dvd_u_676939.2.iso' for writing
writing blank at 0
writing terminator at 9800
sorting 9660
writing primary directory tree at C000
sorting joliet
writing supplementary directory tree at C800
writing 9660 path tables at D000
writing joliet path tables at E000
writing files at F000
writing long NMs at F800
writing pvd at 8000
writing svd at 9000
freeing memory
Quitting

$ geteltorito en_windows_7_professional_with_sp1_x64_dvd_u_676939.2.iso >/dev/null
Booting catalog starts at sector: 20
Manufacturer of CD: Edited with ISO Master
Image architecture: x86
Boot media type is: no emulation
El Torito image starts at sector 21 and has 4 sector(s) of 512 Bytes
Image has been written to stdout ....

I am working on a patch.

Changed in isomaster (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → TJ (tj)
TJ (tj)
tags: added: patch
tags: added: patch-forwarded-debian patch-forwarded-upstream
Changed in isomaster (Ubuntu):
status: In Progress → Confirmed
assignee: TJ (tj) → nobody
Changed in isomaster (Ubuntu):
assignee: nobody → David Johnson (dj-david-web)
Revision history for this message
David Johnson (dj-david-web) wrote :

I love it when people fix their own bugs, good work :-)

Let's give upstream a few days to see if they'll make a new release incorporating your fix, if one isn't forthcoming I'll do a new Debian release.

Changed in isomaster:
status: Unknown → New
Changed in isomaster:
status: New → Fix Released
Revision history for this message
David Johnson (dj-david-web) wrote :

I have incorporated your patch into isomaster-1.3.9-2 now released into Debian unstable, many thanks.

Raised Ubuntu sync request under #1269145.

Changed in isomaster (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package isomaster - 1.3.9-2

---------------
isomaster (1.3.9-2) unstable; urgency=medium

  * Add ld-as-needed.diff patch from Ubuntu
  * Add use-actual-boot-image-size-in-eltorito-boot-catalog.diff patch from
    Ubuntu (Closes: #734390, LP: #1266461)
  * Standards-version to 3.9.5
  * Bump packaging copyright year to 2014

 -- David Johnson <email address hidden> Sun, 12 Jan 2014 17:56:29 +0000

Changed in isomaster (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Andrew Smith (asmith16) wrote :

Hi guys

Sorry it took me so long to deal with this, and thanks for making the patch and putting it in.

I've merged it with the upstream code and will try to push out a new release today.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.