--- Begin Message ---
Package: bsign
Version: 0.4.4
Severity: important
This may not be the only file that causes the problem, but it's
the first one I hit:
/usr/X11R6/lib/modules/v20002d.uc
(which is part of the xserver-xfree86 4.2.1-3 package).
When bsign attempts to sign that file, it generates part of the
new file and then goes into a loop writing "" (zero bytes)
to the new file.
I copied the file to a separate directory, and straced it:
bash-2.05b# mkdir /test_bsign_bug
bash-2.05b# cp -p /usr/X11R6/lib/modules/v20002d.uc /test_bsign_bug/
bash-2.05b# ls -la /test_bsign_bug/
total 38
drwxr-xr-x 2 root root 1024 Mar 13 18:33 .
drwxr-xr-x 23 root root 1024 Mar 13 18:33 ..
-rw-r--r-- 1 root root 35007 Oct 16 16:15 v20002d.uc
bash-2.05b# LOCATIONS="-i /test_bsign_bug"
bash-2.05b# strace -i $BASE_PATH/bsign -s -I -v $LOCATIONS -P "--homedir
$KEY_PATH"
[????????] execve("/crypt/b/bsign", ["/crypt/b/bsign", "-s", "-I", "-v", "-i",
"/test_bsign_bug", "-P", "--homedir /crypt/b"], [/* 23 vars */]) = 0
[08060ef7] fcntl64(0, F_GETFD) = 0
[08060ef7] fcntl64(1, F_GETFD) = 0
[08060ef7] fcntl64(2, F_GETFD) = 0
[0808281d] uname({sys="Linux", node="zona", ...}) = 0
[0808292c] geteuid32() = 0
[080828c0] getuid32() = 0
[08082a04] getegid32() = 0
[08082998] getgid32() = 0
[08082d37] brk(0) = 0x80bb8e8
[08082d37] brk(0x80bb908) = 0x80bb908
[08082d37] brk(0x80bc000) = 0x80bc000
[080562c0] rt_sigaction(SIGHUP, {0x80501c4, [], SA_RESTORER, 0x80563e8}, NULL,
8) = 0
[080562c0] rt_sigaction(SIGINT, {0x80501c4, [], SA_RESTORER, 0x80563e8}, NULL,
8) = 0
[080562c0] rt_sigaction(SIGQUIT, {0x80501c4, [], SA_RESTORER, 0x80563e8}, NULL,
8) = 0
[080562c0] rt_sigaction(SIGABRT, {0x80501c4, [], SA_RESTORER, 0x80563e8}, NULL,
8) = 0
[080562c0] rt_sigaction(SIGPIPE, {0x80501c4, [], SA_RESTORER, 0x80563e8}, NULL,
8) = 0
[080562c0] rt_sigaction(SIGTERM, {0x80501c4, [], SA_RESTORER, 0x80563e8}, NULL,
8) = 0
[08082d37] brk(0x80be000) = 0x80be000
[08060833] lstat64("/test_bsign_bug", {st_mode=S_IFDIR|0755, st_size=1024,
...}) = 0
[08060dd4] open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not
a directory)
[08060dd4] open("/test_bsign_bug", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY)
= 3
[08060c4d] fstat64(3, {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
[08060ef7] fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
[08082563] getdents64(3, /* 3 entries */, 4096) = 80
[08060833] lstat64("/test_bsign_bug/v20002d.uc", {st_mode=S_IFREG|0644,
st_size=35007, ...}) = 0
[08082563] getdents64(3, /* 0 entries */, 4096) = 0
[08060e2d] close(3) = 0
[08060dd4] open("/test_bsign_bug/v20002d.uc", O_RDONLY) = 3
[08060e54] read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\2=2\0\0\0\1\0\0\30\0"...,
64) = 64
[08060eb4] lseek(3, 0, SEEK_SET) = 0
[08060833] lstat64("/test_bsign_bug/v20002d.uc", {st_mode=S_IFREG|0644,
st_size=35007, ...}) = 0
[080806e1] gettimeofday({1047598841, 797311}, NULL) = 0
[08082887] getpid() = 1491
[08060dd4] open("/test_bsign_bug/bsign.GRSUM4", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
[08062f5d] old_mmap(NULL, 35007, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40000000
[08060c4d] fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 13), ...}) = 0
[08062f5d] old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40009000
[08060e84] write(1, "/test_bsign_bug/v20002d.uc\n", 27/test_bsign_bug/v20002d.uc
) = 27
[08060e84] write(4,
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\2=2\0\0\0\1\0\0\30\0"..., 52) = 52
[08060e84] write(4,
"\0\0\0\1\0\0\10\0\0\0\20\0\0\0\20\0\0\0I,\0\0K\360\0\0"..., 32) = 32
[08060e84] write(4,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 21816) = 21816
[08060e84] write(4, "\0.symtab\0.strtab\0.shstrtab\0.text"..., 72) = 72
[08060e84] write(4, "\0\0\0", 3) = 3
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
[08060e84] write(4, "", 0) = 0
... and so on ...
That file appears to be uncorrupted:
bash-2.05b# grep v20002d /var/lib/dpkg/info/xserver-xfree86.md5sums
a5b3e78c592bcd1257972af37d174416 usr/X11R6/lib/modules/v20002d.uc
bash-2.05b# md5sum /usr/X11R6/lib/modules/v20002d.uc
a5b3e78c592bcd1257972af37d174416 /usr/X11R6/lib/modules/v20002d.uc
bash-2.05b# md5sum /test_bsign_bug/v20002d.uc
a5b3e78c592bcd1257972af37d174416 /test_bsign_bug/v20002d.uc
The temporary file when it starts writing nothing forever (after
killing the bsign process) is always this size:
-rw------- 1 root root 18567 Mar 13 18:29 bsign.nE64wc
-rw------- 1 root root 18567 Mar 12 14:57 bsign.x1ROlg
Let me know if you want to see, or would like me to try, anything
else. I'm going to exclude that specific file and see if it stumbles
on any others; if it does I'll followup with more info.
Thanks.
-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux zona 2.4.20zona04002 #1 SMP Wed Feb 19 18:55:55 EST 2003 i686
Locale: LANG=C, LC_CTYPE=C
--- End Message ---