[gnutls-devel] GnuTLS | Segfault in gnutls_x509_privkey_export2_pkcs8 if ECDSAP384SHA384 (#516)

Daniel Salzman gitlab at mg.gitlab.com
Mon Jul 16 11:25:05 CEST 2018


New Issue was created.

Issue 516: https://gitlab.com/gnutls/gnutls/issues/516
Author:    Daniel Salzman
Assignee:  

## Description of problem:
Failed to export key if the algorithm is ECDSAP384SHA384.

## Version of gnutls used:
GnuTLS 3.6.2

Previous versions (3.5.18) are not affected.

## Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
Fedora

## How reproducible:
Will be provided if necessary.

## Actual results:
```
==25535==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc8d3bfff8 (pc 0x000000447164 bp 0x7ffc8d3c08c0 sp 0x7ffc8d3c0000 T0)
    #0 0x447163 in printf_common(void*, char const*, __va_list_tag*) (/usr/local/sbin/keymgr+0x447163)
    #1 0x448c55 in vsnprintf (/usr/local/sbin/keymgr+0x448c55)
    #2 0x448ff9 in __interceptor___snprintf_chk (/usr/local/sbin/keymgr+0x448ff9)
    #3 0x7f39179f37d9 in asn1_create_element (/lib64/libtasn1.so.6+0xc7d9)
    #4 0x7f3919b7bde8 in encode_to_private_key_info /usr/src/debug/gnutls-3.6.2-3.fc28.x86_64/lib/x509/privkey_pkcs8.c:162:7
    #5 0x7f3919b7cf49 in gnutls_x509_privkey_export2_pkcs8 /usr/src/debug/gnutls-3.6.2-3.fc28.x86_64/lib/x509/privkey_pkcs8.c:630:8
    #6 0x7f3919b7c1a6 in _encode_privkey /usr/src/debug/gnutls-3.6.2-3.fc28.x86_64/lib/x509/privkey_pkcs8.c:85:7
    #7 0x7f3919b7c1a6 in encode_to_private_key_info /usr/src/debug/gnutls-3.6.2-3.fc28.x86_64/lib/x509/privkey_pkcs8.c:205:11
    #8 0x7f3919b7cf49 in gnutls_x509_privkey_export2_pkcs8 /usr/src/debug/gnutls-3.6.2-3.fc28.x86_64/lib/x509/privkey_pkcs8.c:630:8
...
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/issues/516
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20180716/cd44ef28/attachment.html>


More information about the Gnutls-devel mailing list