Closed gregoa closed 1 month ago
@sjaeckel it looks like we have an issue in libtomcrypt in pem_decode_openssh
Some relevant info is https://bugs.debian.org/1082952
> FATAL: pem_decode_openssh failed: Invalid argument provided. at t/sshkey.t line 129.
The first three are indeed the same bug: a 64-bit big endian issue in
the bundled libtomcrypt that was updated in 0.081. The x32 failure is
something different and I haven't looked into it.
When decrypting a bcrypt encrypted SSH key, s_decode_header() passes an
'ulong32' pointer for salt length to ssh_decode_sequence_multi() which
expects an 'unsigned long'. On big endian 64-bit hosts, the half that
gets used is zero and bcrypt_pbkdf_openbsd() later barfs out because it
gets zero as salt length.
The code was originally introduced in libtomcrypt commit
https://github.com/libtom/libtomcrypt/commit/fec3d45adc00332c811a84f1a8d9b1fdaa303a3d
and it is not present in the 1.18.2 release that Debian uses.
I'm attaching a proposed patch. This makes the test suite pass
for me on s390x, amd64 and i386. Eyeballs would be welcome,
please don't assume that I know what I'm doing.
Hope this helps,
--
Niko Tyni ntyni@debian.org
@gregoa could you please try CryptX-0.081_001?
(Sorry for the delay, I was travelling in the past days.)
I've now tried 0.081_001 on the Debian s390x porterbox, and I can confirm that all tests, including the previously failing t/sshkey.t
, pass.
Cheers, gregor
fixed in CryptX-0.082
On Mon, 07 Oct 2024 06:47:51 -0700, karel-m wrote:
fixed in CryptX-0.082
Thanks!
Uploaded to Debian, the logs from the various build daemons will appear shortly at https://buildd.debian.org/status/package.php?p=libcryptx-perl.
Cheers, gregor
--
.''. https://info.comodo.priv.at -- Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
. ' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
-
We have the following bug reported to the Debian package of CryptX, c.f. https://bugs.debian.org/1082952
It doesn't seem to be a bug in the packaging, so you may want to take a look. Thanks!
------8<-----------8<-----------8<-----------8<-----------8<-----
------8<-----------8<-----------8<-----------8<-----------8<-----
Thanks for considering, gregor herrmann, Debian Perl Group