[OpenAFS] problem with long vos dump filenames on linux (possible buffer overflow?)

Stephen Joyce stephen@physics.unc.edu
Wed, 9 May 2007 19:40:55 -0400 (EDT)


Is there a known filename limit on vos dump pathnames? This behavior seems 
undesirable.

On Debian Etch w/ openafs 1.4.2, I see the following behavior:
o filenames < 86 characters: success
o filenames between 86 and 93 characters: vos performs an unrequested
   incremental dump with varying dumpdate, rather than a full (maybe the
   filename is overflowing the buffer into the "time" field?)
o filenames > 93 characters: "Volume not attached, does not exist, or not
   on line" error.
o filenames ~200 chars: vos dump hangs

On Debian Etch w/ openafs 1.3.81, the behavior is slightly different:
o filenames < 105 characters: success
o filenames 105+ characters: apparent success followed by a segmentation
   fault message.
o filenames 262+ characters:
    "Error while dumping volume
     VOLSER: illegal operation"


Transcript of 1.4.2 on Debian etch...
  85 char pathname: success:
/usr/bin/vos dump -id user.afstest2.backup -file /tmp/1234567890123456789012345678901234567890123456789012345678901234567890123456789 
-verbose -localauthFull Dump ...
Starting transaction on volume 536876664... done
Starting volume dump on volume 536876664... done
Dumping volume 536876664... done
Ending transaction on volume 536876664... done
Dumped volume user.afstest2.backup in file 
/tmp/1234567890123456789012345678901234567890123456789012345678901234567890123456789


  86 characters:
rm /tmp/1234*
/usr/bin/vos dump -id user.afstest2.backup -file 
/tmp/12345678901234567890123456789012345678901234567890123456789012345678901234567890 
-verbose -localauth
Incremental Dump (as of Wed Dec 31 19:00:48 1969)...
Starting transaction on volume 536876664... done
Starting volume dump on volume 536876664... done
Dumping volume 536876664... done
Ending transaction on volume 536876664... done
Dumped volume user.afstest2.backup in file 
/tmp/12345678901234567890123456789012345678901234567890123456789012345678901234567890

Adding characters changes the unrequested incremental dump date.
88 characters: Incremental Dump (as of Sat Feb  7 20:43:12 1970)...
89 characters: Incremental Dump (as of Fri Mar 21 01:56:48 1997)...

Then, at 94 characters:
/usr/bin/vos dump -id user.afstest2.backup -file 
/tmp/1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 
-verbose -localauth
Incremental Dump (as of Fri Mar 21 01:56:48 1997)...
Starting transaction on volume 536876664...
Could not start transaction on the volume 536876664 to be dumped
    Volume not attached, does not exist, or not on line
Volume not attached, does not exist, or not on line
Error in vos dump command.
Volume not attached, does not exist, or not on line

The volume is definitely online; subsequent vos dumps with small filenames 
succeed.

Cheers, Stephen
--
Stephen Joyce
Systems Administrator                                            P A N I C
Physics & Astronomy Department                         Physics & Astronomy
University of North Carolina at Chapel Hill         Network Infrastructure
voice: (919) 962-7214                                        and Computing
fax: (919) 962-0480                               http://www.panic.unc.edu