mainGnuTLS - Support: sr #108549, gnutls-dane: It is impossible to...

 
 

sr #108549: gnutls-dane: It is impossible to use dane_verify_session_crt() properly

Submitter:  None
Submitted:  Sat 19 Apr 2014 02:23:02 PM UTC
   
 
Category:  Extra library Priority:  5 - Normal
Severity:  6 - Security Status:  Done
Privacy:  Public Assigned to:  nmav
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 28 Apr 2014 09:15:08 AM UTC, comment #3: 

Thank you. I've applied this patch. This patch was small and I've signed it off, but please consider sending the DCO (see http://www.gnutls.org/devel.html ).

Nikos Mavrogiannopoulos <nmav>
Group administrator
Mon 21 Apr 2014 06:43:26 AM UTC, comment #2: 

Added DANE_VERIFY_UNKNOWN_DANE_INFO to replace the unused DANE_VERIFY_NO_DANE_INFO. If we don't understand any of the TLSA records then we have rejected the certificate.

There are other logic flaws here, such as the verification of an invidual record causing an error allowing the DANE checking to be bypassed, when a bogus certificate might have been modified to trick GnuTLS or another TLSA record would have been successful.

(file #31224)

Anonymous
Sun 20 Apr 2014 03:18:40 PM UTC, comment #1: 

Hello and thank you for the patch. I'm currently travelling, I'll check it out upon my return.

Nikos Mavrogiannopoulos <nmav>
Group administrator
Sat 19 Apr 2014 02:23:02 PM UTC, original submission:  

1: If there is one DANE TLSA record and it matches the certificate:
  dane_verify_session_crt() returns DANE_E_SUCCESS
  dane_status = 0

2: If there is one DANE TLSA record and it does not match the certificate:
  dane_verify_session_crt() returns DANE_E_SUCCESS
  dane_status = DANE_VERIFY_CERT_DIFFERS

3: If there are two DANE TLSA record and one of them matches the certificate:
  dane_verify_session_crt() returns DANE_E_SUCCESS
  dane_status = DANE_VERIFY_CERT_DIFFERS

4: If there is one DANE TLSA record and none of them match the certificate:
  dane_verify_session_crt() returns DANE_E_SUCCESS
  dane_status = DANE_VERIFY_CERT_DIFFERS

Scenarios 1 and 3 represent successful verifications.
Scenarios 2 and 4 represent rejected certificates.

It is not possible for a client to correctly reject scenarios 2 and 4 while also accepting scenario 3.

This will lead to clients that either cannot handle certificate rollover (because they will only accept scenario 1) or clients that accept rejected certificates (because they do not check dane_status).

The loop in dane_verify_crt_raw should set the verify value to 0 and exit as soon as any certificate matches successfully.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31224:  gnutls-3.2.12+108549-2.patch added by None (2KiB - text/x-patch - Additional fix)
file #31213:  gnutls-3.2.12+108549.patch added by None (2KiB - text/x-patch - Patch to fix this issue)

 

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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-04-28 nmav StatusNone Done
        Assigned toNone nmav
        Open/ClosedOpen Closed
    2014-04-21 None Attached File- Added gnutls-3.2.12+108549-2.patch, #31224
    2014-04-19 None Attached File- Added gnutls-3.2.12+108549.patch, #31213

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code