[Rpm-maint] [rpm-software-management/rpm] Incorrect length of unknown filedigest algos (#959)

mikhailnov notifications at github.com
Thu Nov 28 18:26:03 UTC 2019


We have implemented Stribog 256bit filedigest algorithm in RPM 5.

Let's dump hashes of files inside it using RPM which has Stribog-256 implemented:
```
[root at rosa-2019 tmp]# rpm -qp --dump grep-3.3-3-rosa2019.0.x86_64.rpm
/bin/egrep 28 1574950713 aa4ae578ca2323caf35beab739f88ea577ab0119063b1aa47954cbe92b686fbc 0100755 root root 0 0 0 X
```
Now let's do the same using RPM 4 (and 5 as well) which does not know about Stribog:
```
$ rpm -qp --dump ./grep-3.3-3-rosa2019.0.i586.rpm
/bin/egrep 28 1574950717 aa4ae578ca2323caf35beab739f88ea5 0100755 root root 0 0 0 X
$ rpm --version
RPM version 4.14.2.1
```

The length of the hash is incorrect.
```
aa4ae578ca2323caf35beab739f88ea577ab0119063b1aa47954cbe92b686fbc
aa4ae578ca2323caf35beab739f88ea5
```

I think it is a bug, RPM should have failed to print hashes, but may be it is a feature... As I did not investigate the issue, I can't say anything about its root cause, may be the size of the hash is not stored anywhere?

That RPM: https://file-store.rosalinux.ru/download/948bd31596c572664b870a226f252e38707ad137 (grep-3.3-3-rosa2019.0.i586.rpm)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/959
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20191128/80cc89ea/attachment-0001.html>


More information about the Rpm-maint mailing list