oops

Brian Warner warner at lothar.com
Sun Aug 9 03:38:16 CEST 1998


My sincerest apologies for messing up my mail gateway and causing my last
message to get repeatedly posted to the list. Oops. I believe I've fixed the
problem.

gpg-0.3.3 compiles and tests fine on my linux-x86 box, but on my linux-ppc
box 'make check' fails randomly about half the time. Focussing on one test,
armencrypt.test, I find that sometimes it creates bogus encrypted messages
and sometimes it creates acceptable ones. I can't figure out any correlation
to when it produces one versus the other, but it seems to stay in one mode
for a few minutes before switching to the other. It does not seem related to
/dev/random running out of entropy.

By using --list-packets, it seems that the "evil" bogus encrypted message has
an encrypted data packet with a different length than the "good" valid
messages. If compression is done on the raw data alone (no headers added
first), then this should always be the same length. So either the compression
is messing up or not all of the encrypted packet is being written out. I'm
linking against zlib-1.1.2 .

Not being able to predict when it will create a bogus message is making it
hard to track down the problem. Samples of the good and bad messages are
attached in case it helps anybody.

thanks,
 -Brian
  warner at lothar.com

: cd gnupg-0.3.3/checks
: ../g10/gpg --homedir . -ea -o x.GOOD --yes -r two plain-3
: cat x.GOOD
-----BEGIN PGP MESSAGE-----
Version: GNUPG v0.3.3 (GNU/Linux)
Comment: Get GNUPG from ftp://ftp.guug.de/pub/gcrypt/

hNYDDvng6C5fpPQQAx0QB3ozt9C4q+ONJaHEacggbzcyk5jSE5ndMtsv+vFpluwwWiHbzsq8
sxrEVf0r1AnTJxzBNB2FGrqdfwNy2bo3syXWmXhXdjH50jmL6TG6Mwr23FhnbXkNEeFBXYJa
4RJODitfAyDUpLSNX4VG7s1/K4yjnPWg+i8apga8E5OqqroOig/5PIrJUMjqa0qXdd3rcgsA
YS7OcPEInYLWpVF6rbX8jcsZXPs1E1sipENKHYoBMmLZzEzoYQRDbSk2oVzVIGRt1kLFqYpH
yUfDKVO3vyWRiPmN+6OjDEI7deDTIv0J1irHxjxCmdI1AqIFDJiupIEju6592YFXjG/1d9kX
O1kd377F3Ch5kXXZZVX1c6gYGQ==
=mDWC
-----END PGP MESSAGE-----
: ../g10/gpg --homedir . --list-packets x.GOOD 
:pubkey enc packet: version 3, algo 16, keyid 0EF9E0E82E5FA4F4
        data: [797 bits]
        data: [800 bits]
gpg: note: cipher algorithm 4 not found in preferences
:encrypted data packet:
        length: 61
:compressed packet: algo=1
:literal data packet:
        mode b, created 902650620, name="plain-3",
        raw data: 45 bytes

(then, a few minutes later..)
: ../g10/gpg --homedir . -ea -o x.EVIL --yes -r two plain-3
: cat x.EVIL
-----BEGIN PGP MESSAGE-----
Version: GNUPG v0.3.3 (GNU/Linux)
Comment: Get GNUPG from ftp://ftp.guug.de/pub/gcrypt/

hNYDDvng6C5fpPQQAyCDfvSoWz1G+aLjLvU/uT2otFA7PXINmvNuzrmQOEeVszwEeKGxiDC8
0qYMxJlD6oq/IPSeI99iXni9Njfd4ZUB67aNObeXqIg6erN8rO9d4NJf2MCYyVdPTCSfcBHC
jMsVbQ9wAx9bBL6SMO1umKZes46ePdp7uKF5s3Ys2whIAVinAVPfa6Atishk89KskJIvehZo
yWVYHP2SCVmasSMN9to8DV1VU4PTsL36FTZ+09UJA7nJ8wGHI1UQrQLO9gTsr438uG0ehbKR
yUboG3f9gTgQYioexVvFMgziHihkXFAwAKz15W+TB6Qj2ea+guhQkiLxQCDuJlWqBBMfinhS
tI2GGgNKyJePRF5GvAxXXQrh
=+3oq
-----END PGP MESSAGE-----
: ../g10/gpg --homedir . --list-packets x.EVIL 
:pubkey enc packet: version 3, algo 16, keyid 0EF9E0E82E5FA4F4
        data: [800 bits]
        data: [799 bits]
gpg: note: cipher algorithm 4 not found in preferences
:encrypted data packet:
        length: 60
:compressed packet: algo=1
gpg: fatal: zlib inflate problem: rc=-5
secmem usage: 5856/5856 bytes in 5/9 blocks of pool 7040/16384




More information about the Gnupg-devel mailing list