mainGnuTLS - Support: sr #107831, local 'len' in...

 
 

sr #107831: local 'len' in gnutls_x509_crt_get_key_id not initialized, causing segmentation fault

Submitter:  None
Submitted:  Wed 05 Oct 2011 06:45:11 PM UTC
   
 
Category:  Core library Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 05 Oct 2011 07:16:49 PM UTC, comment #2: 

It was, yes.

Anonymous
Wed 05 Oct 2011 07:12:43 PM UTC, comment #1: 

Thanks. It will be fixed in the next release. Was it an ECDSA key you were generating?

Nikos Mavrogiannopoulos <nmav>
Group administrator
Wed 05 Oct 2011 06:45:11 PM UTC, original submission:  

With gnutls 3.0.3, certtool segfaults when I try to generate a self-signed certificate. The problem is that

asn1_der_coding (crt->cert, "tbsCertificate.subjectPublicKeyInfo", NULL, &len, NULL);

is called with len unitialized. Since len contains garbage, asn1_der_coding thinks it is okay to write to the output buffer, which is NULL. The following patch fixes the problem for me.


--- gnutls-3.0.3/lib/x509/x509.c.orig        2011-10-05 17:25:53.025852307 +0000
+++ gnutls-3.0.3/lib/x509/x509.c        2011-10-05 17:26:04.232713442 +0000
@@ -2283,7 +2283,7 @@
                             unsigned char *output_data,
                             size_t * output_data_size)
 {
-  int pk, result = 0, len;
+  int pk, result = 0, len = 0;
   gnutls_datum_t pubkey;

   if (crt == NULL)


Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-10-23 nmav StatusNone Done
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code