Page MenuHome GnuPG

gnupg errors overwriting files when decripting, also doesn't recognise wrong pw!
Closed, ResolvedPublic

Description

Release: booh

Environment

gentoo linux,
gemini asbesto # ldd /usr/bin/gpg

libz.so.1 => /lib/libz.so.1 (0x4002c000)
libreadline.so.4 => /lib/libreadline.so.4 (0x4003e000)
libdl.so.2 => /lib/libdl.so.2 (0x4006c000)
libusb-0.1.so.4 => /usr/lib/libusb-0.1.so.4 (0x40070000)
libc.so.6 => /lib/libc.so.6 (0x40078000)
/lib/ld-linux.so.2 (0x40000000)

Description

when trying to decode .RAR multivolume files created some time ago with PGP 2.6.3 with simmetric cipher:

  • i obtain weird messages instead of a "Bad Passphrase" message
  • i obtain errors while gpg try to overwrite the original file, decripting it.
  • gnupg segfault inserting some bad passphrases.

    Using the old pgp 2.6.3 gave me no problems at all.

How To Repeat

asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ v
total 5020
drwxr-xr-x 2 asbesto users 4096 9 set 11:30 .
drwxr-xr-x 15 asbesto users 4096 9 set 09:54 ..
-rwxr-xr-x 1 asbesto users 1440597 9 set 11:32 telix.r00
-rwxr-xr-x 1 asbesto users 1440520 9 set 11:32 telix.r01
-rwxr-xr-x 1 asbesto users 789483 9 set 11:32 telix.r02
-rwxr-xr-x 1 asbesto users 1438259 9 set 11:32 telix.rar
asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $

asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ gpg telix.rar
gpg: assuming IDEA encrypted data
gpg: telix.rar: unknown suffix
Enter new filename [telix.rar]:
File Telix.rar' exists. Overwrite? (y/N) y
gpg: [don't know]: invalid packet (ctb=22)
gpg: [don't know]: invalid packet (ctb=6a)
gpg: WARNING: message was not integrity protected
gpg: [don't know]: invalid packet (ctb=51)

asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ file telix.rar
telix.rar: RAR archive data, v14, os: MS-DOS

asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ gpg telix.r00
gpg: assuming IDEA encrypted data
gpg: telix.r00: unknown suffix
Enter new filename [telix.r00]:
File Telix.r00' exists. Overwrite? (y/N) y
gpg: fatal: zlib inflate problem: invalid block type
secmem usage: 2048/2208 bytes in 4/5 blocks of pool 2208/32768
asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $

asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ ls -la telix.r00
-rwxr-xr-x 1 asbesto users 0 9 set 11:34 telix.r00
asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $

asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ gpg telix.r00
gpg: assuming IDEA encrypted data
gpg: telix.r00: unknown suffix
Enter new filename [telix.r00]: merda
gpg: WARNING: message was not integrity protected
asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $

asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ ls -la merda
-rw-r--r-- 1 asbesto users 1440000 9 set 11:35 merda
asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ file merda
merda: RAR archive data, v14, os: MS-DOS
asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $

EXAMPLE about a bad passphrase:

asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ gpg telix.rar
gpg: assuming IDEA encrypted data
gpg: [don't know]: invalid packet (ctb=7e)
gpg: WARNING: message was not integrity protected
gpg: [don't know]: partial length for invalid packet type 62
asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ gpg telix.rar
gpg: assuming IDEA encrypted data
gpg: [don't know]: invalid packet (ctb=1c)
gpg: WARNING: message was not integrity protected
gpg: [don't know]: partial length for invalid packet type 31
asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $
asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $ gpg telix.rar
gpg: assuming IDEA encrypted data
gpg: [don't know]: invalid packet (ctb=19)
gpg: WARNING: message was not integrity protected
gpg: assuming IDEA encrypted data
gpg: telix.rar: unknown suffix

  • glibc detected * free(): invalid next size (fast): 0x08110148 * Aborted asbesto@gemini ~/BACKUP/1/old/azzimiei/telix $

problem seem weird when using special characters or "!" into the passphrase.

Fix

Unknown

Event Timeline

From: asbesto molesto <asbesto@gmail.com>
To: bug-any@bugs.gnupg.org
Cc:
Subject: Re: gnupg/534
Date: Tue, 13 Sep 2005 12:36:13 +0000

------=_Part_2755_8700451.1126614973951
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 9/12/05, wk@gnupg.org <wk@gnupg.org> wrote:

20

Care to tell us the version of gnupg you are using? The
glibc mentioned free problem needs to be fixed in any case.

asbesto@gemini ~ $ gpg --version
gpg (GnuPG) 1.4.1
Copyright (C) 2005 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512
Compression: Uncompressed, ZIP, ZLIB

I am not sure what you actually problem is, would you mind

to explain it in other words? From what I see is that you
are running gpg on non OpenPGP data, so for sure you will
see strange messages.

Yes, i ran gpg on old data created with pgp 2.6.3ia....
i don't know how to explain my problem in other words; i included
the exact step i done to describe it ...


asbesto AT gmail PUNTAZZO com - GPG Fingerprint:
8935 5586 7F2D 9C5E 51B6 BBC5 EA15 9A4E 613D 44D7

------=_Part_2755_8700451.1126614973951
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 9/12/05, <b class=3D"gmail_sendername"><a href=3D"mailto:wk@gnupg.org">w=
k@gnupg.org</a></b> &lt;<a href=3D"mailto:wk@gnupg.org">wk@gnupg.org</a>&gt=
; wrote:<div><span class=3D"gmail_quote"></span><blockquote class=3D"gmail_=
quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt =
0pt 0.8ex; padding-left: 1ex;">
Care to tell us the version of gnupg you are using?&nbsp;&nbsp;The<br>glibc=
mentioned free problem needs to be fixed in any case.</blockquote><div><br=

asbesto@gemini ~ $ gpg --version<br>
gpg (GnuPG) 1.4.1<br>
Copyright (C) 2005 Free Software Foundation, Inc.<br>
This program comes with ABSOLUTELY NO WARRANTY.<br>
This is free software, and you are welcome to redistribute it<br>
under certain conditions. See the file COPYING for details.<br>
<br>
Home: ~/.gnupg<br>
Supported algorithms:<br>
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA<br>
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH<br>
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512<br>
Compression: Uncompressed, ZIP, ZLIB<br>
<br>
</div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb=
(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am not su=
re what you actually problem is, would you mind<br>to explain it in other w=
ords?&nbsp;&nbsp;From what I see is that you
<br>are running gpg on non OpenPGP data, so for sure you will<br>see strang=
e messages.</blockquote><div><br>
<br>
Yes, i ran gpg on old data created with pgp 2.6.3ia....<br>
i don't know how to explain my problem in other words; i included<br>
the exact step i done to describe it ...<br>
<br>
</div></div>---<br>asbesto AT gmail PUNTAZZO com - GPG Fingerprint:<br>8935=
5586 7F2D 9C5E 51B6&nbsp;&nbsp;BBC5 EA15 9A4E 613D 44D7<br><br>

------=_Part_2755_8700451.1126614973951--

Care to tell us the version of gnupg you are using? The
glibc mentioned free problem needs to be fixed in any case.

I am not sure what you actually problem is, would you mind
to explain it in other words? From what I see is that you
are running gpg on non OpenPGP data, so for sure you will
see strange messages.

You are trying to decrypt or verify an RAR archive. Obviously this won't work.
if you want to *en*crypt a file, you neet to tell gpg so:

gpg -e telix.rar

or symmetrically:

gpg -c telix.rar

this will create a new file telix.rar.gpg which you can later feed to gpg for
decryption.