Page MenuHome GnuPG

large files are not encoded properly.
Closed, ResolvedPublic

Description

Release: 1.2.2

Environment

both sparc/solaris and x86/redhat linux systems.

Description

When a file that is larger than 4GB is encrypted, the plaintext data is not encoded properly. the plaintext appears as a single literal data packet whose length is set to the low 32 bits of the actual plaintext length (but the body of the packet includes the entire plaintext). Once the first (size % 0xFFFFFFFF) bytes are read, gpg attempts to parse the remaining data as a new packet and fails.

I don't know if the correct fix is multiple literal packets using Partial Body Lengths or multiple literal packets with 5-byte lengths (since the standard clearly discourages the use of indeterminate length packets where they can be avoided, that isn't a real option).

PR#304 is the same issue, even if they don't know it.

How To Repeat

Create a 5GB file (dd if=/dev/zero of=file bs=1024k count=5000)
Sign it _without compression_ (gpg -z 0 --sign file)
Try to verify the signature. Use --list-packets to verify that the literal data packet has the wrong size.

Fix

Unknown

Event Timeline

dshaw added a subscriber: dshaw.

This was already fixed for the upcoming 1.2.5 release.