Closed falko-strenzke closed 1 month ago
pgp_key_size
will return 0
since sesskey->salg
is initialized with PGP_SA_UNKNOWN
and later on the keylen
will be checked with the decrypted result later.
Two improvements for readability and maintainability possible:
1) Make the check earlier (decbuf
and param->aead_hdr.ealg
are available already)
2) Split PKESKv3/SEIPDv1 and PKESKv6/SEIPDv2 cases completely
The first one should be little effort
Improved a bit in update-draft-05 branch
in
stream-parse.cpp:encrypted_try_key()
we find the code:This looks like keylen will receive an invalid value (based on unassigned memory?) in case of v6 PKESK.
@TJ-91