[isoinfo] could not extract large files

Bug #1475250 reported by Taihsiang Ho
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cdrkit (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu trusty with genisoimage (9:1.1.11-2ubuntu3)

Steps to reproduce this bug:
apply this command
"isoinfo -R -i my-customized-ubuntu-trusty-image.iso -x /casper/filesystem.squashfs"

Expected result:
data pops up to stdout

Actual result:
nothing pops up to stdout

------------------------

More info:

1. filesystem.squashfs is very large ( 2.6 GB)
isoinfo -R -i my-customized-ubuntu-trusty-image.iso -l | grep filesystem.sq
-r--r--r-- 1 0 0 2729099264 Jun 22 2015 [ 208211 00] filesystem.squashfs

2. isovfy my-customized-ubuntu-trusty-image.iso
Root at extent 25, 2048 bytes
[0 0]
[100 124]
[200 229]
No errors found

3. isodump shows the size looks like overflow
isodump my-customized-ubuntu-trusty-image.iso
118 [ 1] 11d 2048 02/*CASPER [RR=1,NM=casper,PX=2,TF]
press "g" and input "11d + enter"
146 [ 1] 32d53 -1565868032 00/ FILESYSTEM.SQUASHFS;1[RR=1,NM=filesystem.squashfs,PX=1,TF]

4. isoinfo version
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================================-=====================-=====================-=====================================================================
ii genisoimage 9:1.1.11-2ubuntu3 amd64 Creates ISO-9660 CD-ROM filesystem images

Revision history for this message
Taihsiang Ho (tai271828) wrote :

is it iso9660 spec limitation that each single file could not larger than 2 GB?

Revision history for this message
Taihsiang Ho (tai271828) wrote :

in this case,
len is negative so the program does not begin to extract data in the while loop.

cdrkit-1.1.11/genisoimage/diag/isoinfo.c

 631 extract_file(struct iso_directory_record *idr)
 632 {
 633 int extent, len, tlen;
 634 unsigned char buff[2048];
 635
 636 #if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__EMX__) || defined(__DJGPP__)
 637 setmode(fileno(stdout), O_BINARY);
 638 #endif
 639
 640 extent = isonum_733((unsigned char *)idr->extent);
 641 len = isonum_733((unsigned char *)idr->size);
 642
 643 while (len > 0) {
 644 #ifdef USE_SCG
 645 readsecs(extent - sector_offset, buff, ISO_BLOCKS(sizeof (buff)));
 646 tlen = (len > sizeof (buff) ? sizeof (buff) : len);
 647 #else
 648 lseek(fileno(infile), ((off_t)(extent - sector_offset)) << 11, SEEK_SET);
 649 tlen = (len > sizeof (buff) ? sizeof (buff) : len);
 650 read(fileno(infile), buff, tlen);
 651 #endif
 652 len -= tlen;
 653 extent++;
 654 write(STDOUT_FILENO, buff, tlen); /* FIXME: check return value */
 655 }
 656 }

(gdb) print len
$1 = -1565868032

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks like wrong types used. Though yes, classic iso9960 FS is limited to 2GB file sizes.

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.