gpg: fatal: zlib inflate problem

Cees van de Griend cees-list at griend.xs4all.nl
Tue Nov 3 23:48:33 CET 1998


I am on a Linux system (RedHat 5.1) with a Pentium 133 MHz and used
gnupg-0.4.2. I subscribed yesterday, so it is possible that these 
problems are already know. 

With some playing around with gpg I had some strange errors.
I was testing with some cpio backups and encrypted these with gpg.

With large files and decrypt I got some errors. I noticed if I used
the 'no commpression option' (-z0), there were no errors. Only with 
z1 .. z9 were there errors. Also random data and gziped data (almost
random) gave no problems, only large text files. These errors only 
came if gpg is used on files. There are no errors if gpg is used as 
filter.

So I wrote a 'little' test-script:
===========================================================
#!/bin/bash

if [ ! -f pge0112.txt ] ; then
    unzip pge0112.zip
fi    

SIZE="5000 5100 5200 5300 5400 5500 5600 5700 5800 5900 \
      6000 6100 6200 6300 6400 6500 6600 6700 6800 6900 \
      7000"

for S in $SIZE ; do
    dd if=pge0112.txt of=text.$S bs=1000 count=$S
done    

for S in $SIZE ; do
    gpg --output text.$S.gpg --remote-user cees --encrypt text.$S
    gpg --passphrase-fd 3 --output text-out.$S \
    	--decrypt text.$S.gpg 3< passphrase

    cat text.$S \
	| gpg --output - --remote-user cees --encrypt \
	| gpg --passphrase-fd 3 --output - --decrypt 3< passphrase \
	> stdin-out.$S
done

for S in $SIZE ; do
    md5sum text.$S text-out.$S stdin-out.$S
done
===========================================================
N.B.:	pge0112.zip is a ziped large text-file from 
	http://www.gutenberg.org/.

ls -l pgw0112.*
-rw-r--r--   1 cees     users     8441343 Dec 11  1994 pge0112.txt
-rw-r--r--   1 cees     users     3483430 Nov 19  1996 pge0112.zip
===========================================================

I got mostly no errors from the size 5000 to 7000 (step 100), only
at the sizes 5100, 5200, 5700, 5900, 6000, 6200, 6400, 6800.
(8 in 21 is 26.25% [grin]). But if gpg is used as a filter, I get NO 
errors.

I got no only an error at 6000 from the size 1000 to 8000 (step 1000) 
with text files. The same range with random data gave no errors.

Size 5100:
gpg: fatal: zlib inflate problem: oversubscribed dynamic bit lengths tree
secmem usage: 5984/8224 bytes in 6/12 blocks of pool 8448/16384

Size 5200:
gpg: fatal: zlib inflate problem: too many length or distance symbols
secmem usage: 5984/8224 bytes in 6/12 blocks of pool 8448/16384

Size 5700:
gpg: fatal: zlib inflate problem: oversubscribed dynamic bit lengths tree
secmem usage: 5984/8224 bytes in 6/12 blocks of pool 8448/16384

Size 5900:
gpg: fatal: zlib inflate problem: oversubscribed dynamic bit lengths tree
secmem usage: 5984/8224 bytes in 6/12 blocks of pool 8448/16384

Size 6000:
gpg: fatal: zlib inflate problem: oversubscribed dynamic bit lengths tree
secmem usage: 5984/8224 bytes in 6/12 blocks of pool 8448/16384

Size 6200:
gpg: fatal: zlib inflate problem: incomplete dynamic bit lengths tree
secmem usage: 5984/7648 bytes in 6/10 blocks of pool 7872/16384

Size 6400:
gpg: fatal: zlib inflate problem: oversubscribed dynamic bit lengths tree
secmem usage: 5984/7648 bytes in 6/10 blocks of pool 7872/16384

Size 6800:
gpg: fatal: zlib inflate problem: oversubscribed dynamic bit lengths tree
secmem usage: 5984/8224 bytes in 6/12 blocks of pool 8448/16384

My system uses zlib 1.1.2.
I downloaded the last version of gnupg (gnupg-0.4.2.tar.gz) and did a
'configure --with-included-zlib', and a quick test showed that the
problems were the same.

I still have the gpg-ed text files, so the errors can be reproduced.
(You only need my keys [grin].)

Cees van de Griend
-- 
Send a mail to <cees-help at griend.xs4all.nl> for more information.
 
Dajonlu'pa' bIHeghjaj.
May you die before you are captured.
       Mark Okrand, "Star Trek: The Klingon Way - A Warrier's Guide"




More information about the Gnupg-devel mailing list