kern/91488: [patch] cd9660 filesystem cannot handle files larger than 2GB

Carl Drougge freebsd-cd9660-bug at z42.net
Sat Jan 7 16:20:04 PST 2006


>Number:         91488
>Category:       kern
>Synopsis:       [patch] cd9660 filesystem cannot handle files larger than 2GB
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 08 00:20:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Carl Drougge
>Release:        6.0-RELEASE
>Organization:
>Environment:
FreeBSD k6.lundagatan.com 6.0-RELEASE FreeBSD 6.0-RELEASE #1: Sun Jan  8 00:15:19 CET 2006     root at k6.lundagatan.com:/usr/src/sys/i386/compile/K6  i386
>Description:
The cd9660 filesystem can not handle files of more than 2147483647 bytes, 
while the specification of the filesystem arguably allows for files up to 
4294967295 bytes. (Specifically, the "32 bit quantity" is not specified as 
signed or unsigned. In my opinion, since negative file sizes are not 
meaningfull, it should be interpreted as unsigned.)
>How-To-Repeat:
Mount an iso9660 filesystem containing a file of more than 2147483647 
bytes, and try to access this file.

ls gives "ls: large_file: Value too large to be stored in data type", 
attempts to read the file return EOF at once.
>Fix:
I have not tested this patch much, but it seems to work.

--- sys/isofs/cd9660/cd9660_node.h.org	Wed Mar 16 09:09:52 2005
+++ sys/isofs/cd9660/cd9660_node.h	Sun Jan  8 00:14:54 2006
@@ -69,7 +69,7 @@
	ino_t	i_ino;		/* inode number of found directory */
 
	long iso_extent;	/* extent of file */
-	long i_size;
+	u_long i_size;
	long iso_start;		/* actual start of data of file (may be different */
				/* from iso_extent, if file has extended attributes) */
	ISO_RRIP_INODE	inode;

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list