[gnutls-devel] GnuTLS | Fix parsing of BIT STRING encoded EdDSA keys (!2060)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Thu Feb 19 15:22:17 CET 2026
Zoltán Fridrich commented on a discussion on lib/pubkey.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/2060#note_3097910444
> return gnutls_assert_val(_gnutls_asn2err(ret));
>
> switch (tag) {
> - case 0x03:
> - etype = ASN1_ETYPE_BIT_STRING;
> + case 0x03: /* BIT STRING */
> + data_len = asn1_get_length_der(ecpoint->data + tag_len,
> + ecpoint->size - tag_len,
> + &len_len);
> + if (data_len < 0)
> + return gnutls_assert_val(
> + GNUTLS_E_ASN1_DER_ERROR);
> +
> + /* skip first byte of data (number of unused bits at the end) */
Pointless. If its 0 it will fail with GNUTLS_E_ILLEGAL_PARAMETER because `raw_point.size != curve_size` would fail
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2060#note_3097910444
You're receiving this email because of your account on gitlab.com. Unsubscribe from this thread: https://gitlab.com/-/sent_notifications/3-dp6e7k2bnsk7m9mnmi4ff6vc8/unsubscribe | Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20260219/e94694df/attachment.html>
More information about the Gnutls-devel
mailing list