helpGnuTLS - Support: sr #107730, certtool --generate-certificate...

 
 

sr #107730: certtool --generate-certificate segfaults

Submitted by:  Petr Pisar <petrp>
Submitted on:  Wed 29 Jun 2011 08:44:53 PM UTC  
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  Nikos Mavrogiannopoulos <nmav>
Open/Closed:  Closed Operating System:  None

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 23 Jul 2011 02:32:59 PM UTC, comment #2: 
Nikos Mavrogiannopoulos <nmav>
Project AdministratorIn charge of this item.
Wed 29 Jun 2011 09:00:00 PM UTC, comment #1: 

Attached should fix this problem.

(file #23591)

Petr Pisar <petrp>
Wed 29 Jun 2011 08:44:53 PM UTC, original submission:  

When signing certificate request by CA, certtool (from git HEAD) segfaults:

Starting program: /tmp/gnutls-devel/src/.libs/certtool --generate-certificate --hash SHA256 --bits 2048 --load-ca-privkey /home/petr/projekty/libisds/libisds-devel/server/tls/ca.key --load-ca-certificate /home/petr/projekty/libisds/libisds-devel/server/tls/ca.cert --load-request pisar-q.req --outfile pisar-q.crt
[Thread debugging using libthread_db enabled]
Generating a signed certificate...

[...]

Signing certificate...

Program received signal SIGSEGV, Segmentation fault.
0xb7f46de2 in gnutls_privkey_deinit (key=0x0) at gnutls_privkey.c:272
272       if (key->flags & GNUTLS_PRIVKEY_IMPORT_AUTO_RELEASE)
(gdb) bt full
#0  0xb7f46de2 in gnutls_privkey_deinit (key=0x0) at gnutls_privkey.c:272
No locals.
#1  0x0804e463 in generate_signed_certificate (cinfo=0xbfffea28)
    at certtool.c:910
        crt = 0x80780e0
        key = 0x0
        size = 1200
        result = 0
        ca_key = 0x8080708
        ca_crt = 0x8077ad8
#2  0x0804ed96 in gaa_parser (argc=14, argv=0xbfffeb14) at certtool.c:1131
        ret = 0
        cinfo = {secret_key = 0x0, privkey = 0x0, pubkey = 0x0, pkcs8 = 0,
          incert_format = 1, cert = 0x0, request = 0xbfffee2d "pisar-q.req",
          ca = 0xbfffede1 "/home/petr/projekty/libisds/libisds-devel/server/tls/ca.cert",
          ca_privkey = 0xbfffed8f "/home/petr/projekty/libisds/libisds-devel/server/tls/ca.key"}
#3  0x0804c88d in main (argc=14, argv=0xbfffeb14) at certtool.c:102
No locals.

It tries to deinitialize private key from request that's NULL because request does not contain private key usually.

Petr Pisar <petrp>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #23591:  0001-Honor-uninitialized-private-key-in-destructor.patch added by petrp (735B - application/octet-stream - Proposed fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nmav (Posted a comment)
  • -email is unavailable- added by petrp (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-07-23 nmav Open/ClosedOpen => Closed
    2011-07-23 nmav StatusNone => Done
        Assigned toNone => nmav
    2011-06-29 petrp Attached File- => Added 0001-Honor-uninitialized-private-key-in-destructor.patch, #23591

    Back to the top


    Powered by Savane 3.7