Bug 123650 - [PATCH] b64encode() doesn't like leading NUL (was 'tgpg' fails to check some packages)
[PATCH] b64encode() doesn't like leading NUL (was 'tgpg' fails to check some ...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: beecrypt (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks: FC3Target FC4Target
  Show dependency treegraph
 
Reported: 2004-05-19 16:09 EDT by Enrico Scholz
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version: 4.1.2-7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-17 14:36:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Don't return "" for binary data starting with NUL (335 bytes, patch)
2005-04-26 16:10 EDT, Miloslav Trmač
no flags Details | Diff

  None (edit)
Description Enrico Scholz 2004-05-19 16:09:06 EDT
Description of problem:

http://download.fedora.us/fedora/fedora/2/i386/RPMS.stable/lzo-1.08-0.fdr.2.2.i386.rpm
is signed correctly, but 'tgpg' fails because of a malformed CRC.

| # wget http://www.fedora.us/FEDORA-GPG-KEY
| # rpm --import FEDORA-GPG-KEY
| # gpg --import FEDORA-GPG-KEY
| # wget http://download.fedora.us/fedora/fedora/2/i386/RPMS.stable/lzo-1.08-0.fdr.2.2.i386.rpm
| # rpm -K lzo-1.08-0.fdr.2.2.i386.rpm
| lzo-1.08-0.fdr.2.2.i386.rpm: (sha1) dsa sha1 md5 gpg OK
| 
| # /usr/lib/rpm/tgpg lzo-1.08-0.fdr.2.2.i386.rpm 
| ...
| gpg: malformed CRC
| ...

I know some other rpms also:
2-stable/i386/graphviz-1.10-0.fdr.3.2.i386.rpm
2-stable/i386/lzo-1.08-0.fdr.2.2.i386.rpm
2-stable/i386/nethack-falconseye-1.9.4-0.fdr.4.a.1.90.i386.rpm


Btw, it would be nice when 'tgpg' could be used in scripts. E.g. be
more quietly and return a meaningful return code.



Version-Release number of selected component (if applicable):

rpm-4.3.1-0.3
Comment 1 Matthew Miller 2005-04-26 12:00:01 EDT
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.
Comment 2 Miloslav Trmač 2005-04-26 16:06:46 EDT
gnupg-1.4.1-1 handles the rpm armored output correctly,
but that looks like the two bugs cancelling each other.

The RPM output doesn't seem to be a valid ASCII armor,
beecrypt's fault.
Comment 3 Miloslav Trmač 2005-04-26 16:10:56 EDT
Created attachment 113689 [details]
Don't return "" for binary data starting with NUL

The attached patch (I'll send it upstream shortly) fixes b64encode().
The check for "" is invalid for binary data.  For NUL-terminated
data it is superfluous, the function does the right thing for zero-length
data anyway.

Paul, if you want me to build an updated package, just yell.
Comment 4 Paul Nasrat 2005-05-17 13:15:07 EDT
Mitr - if you could build a beecrypt with this in that'd be great.

Thanks

Note You need to log in before you can comment on or make changes to this bug.