This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "Race condition in checking for certificate revocation"

From OWASP
Jump to: navigation, search
Line 1: Line 1:
 
{{Template:SecureSoftware}}
 
{{Template:SecureSoftware}}
 +
{{Template:Vulnerability}}
  
==Overview==
+
[[Category:FIXME|This is the text from the old template. This needs to be rewritten using the new template.]]
  
If the revocation status of a certificate is not checked before each privilege requiring action, the system may be subject to a race condition, in which their certificate may be used before it is checked for revocation.
+
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
 +
 
 +
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
  
==Consequences ==
+
[[ASDR Table of Contents]]
 +
__TOC__
  
* Authentication: Trust may be assigned to an entity who is not who it claims to be.
 
  
* Integrity: Data from an untrusted (and possibly malicious) source may be integrated.
+
==Description==
  
* Confidentiality: Date may be disclosed to an entity impersonating a trusted entity, resulting in information disclosure.
+
If the revocation status of a certificate is not checked before each privilege requiring action, the system may be subject to a race condition, in which their certificate may be used before it is checked for revocation.
  
==Exposure period ==
+
'''Consequences'''
  
* Design: Checks for certificate revocation should be included in the design of a system
+
* Authentication: Trust may be assigned to an entity who is not who it claims to be.
 +
* Integrity: Data from an untrusted (and possibly malicious) source may be integrated.
 +
* Confidentiality: Date may be disclosed to an entity impersonating a trusted entity, resulting in information disclosure.
  
* Design: One can choose to use a language which abstracts out this part of the authentication process.
+
'''Exposure period'''
  
==Platform ==
+
* Design: Checks for certificate revocation should be included in the design of a system
 +
* Design: One can choose to use a language which abstracts out this part of the authentication process.
  
* Languages: Languages which do not abstract out this part of the process.
+
'''Platform'''
  
* Operating platforms: All
+
* Languages: Languages which do not abstract out this part of the process.
 +
* Operating platforms: All
  
==Required resources ==
+
'''Required resources'''
  
 
Minor trust: Users must attempt to interact with the malicious system.
 
Minor trust: Users must attempt to interact with the malicious system.
  
==Severity ==
+
'''Severity'''
  
 
Medium
 
Medium
  
==Likelihood   of exploit ==
+
'''Likelihood of exploit'''
  
 
Medium
 
Medium
  
==Avoidance and mitigation ==
+
If a certificate is revoked after the initial check, all subsequent actions taken with the owner of the revoked certificate will loose all benefits guaranteed by the certificate. In fact, it is almost certain that the use of a revoked certificate indicates malicious activity.
  
* Design: Ensure that certificates are checked for revoked status before each use of a protected resource
+
If the certificate is checked before each access of a protected resource, the delay subject to a possible race condition becomes almost negligible and significantly reduces the risk associated with this issue.
  
==Discussion ==
 
  
If a certificate is revoked after the initial check, all subsequent actions taken with the owner of the revoked certificate will loose all benefits guaranteed by the certificate. In fact, it is almost certain that the use of a revoked certificate indicates malicious activity.
+
==Risk Factors==
  
If the certificate is checked before each access of a protected resource, the delay subject to a possible race condition becomes almost negligible and significantly reduces the risk associated with this issue.
+
TBD
  
==Examples ==
+
==Examples==
  
 
In C/C++:
 
In C/C++:
Line 60: Line 66:
 
</pre>
 
</pre>
  
==Related problems ==
+
==Related [[Attacks]]==
 +
 
 +
* [[Attack 1]]
 +
* [[Attack 2]]
 +
 
 +
 
 +
==Related [[Vulnerabilities]]==
 +
 
 +
* [[Failure to follow chain of trust in certificate validation]]
 +
* [[Failure to validate host-specific certificate data]]
 +
* [[Failure to validate certificate expiration]]
 +
* [[Failure to check for certificate revocation]]
 +
 
 +
 
 +
==Related [[Controls]]==
 +
 
 +
* Design: Ensure that certificates are checked for revoked status before each use of a protected resource
 +
 
 +
 
 +
==Related [[Technical Impacts]]==
 +
 
 +
* [[Technical Impact 1]]
 +
* [[Technical Impact 2]]
 +
 
 +
 
 +
==References==
 +
Note: A reference to related [http://cwe.mitre.org/ CWE] or [http://capec.mitre.org/ CAPEC] article should be added when exists. Eg:
 +
 
 +
* [http://cwe.mitre.org/data/definitions/79.html CWE 79].
 +
* http://www.link1.com
 +
* [http://www.link2.com Title for the link2]
 +
 
 +
[[Category:FIXME|add links
 +
 
 +
In addition, one should classify vulnerability based on the following subcategories: Ex:<nowiki>[[Category:Error Handling Vulnerability]]</nowiki>
 +
 
 +
Availability Vulnerability
 +
 
 +
Authorization Vulnerability
 +
 
 +
Authentication Vulnerability
 +
 
 +
Concurrency Vulnerability
 +
 
 +
Configuration Vulnerability
 +
 
 +
Cryptographic Vulnerability
 +
 
 +
Encoding Vulnerability
 +
 
 +
Error Handling Vulnerability
  
* [[Failure to follow chain of trust in certificate validation]]
+
Input Validation Vulnerability
  
* [[Failure to validate host-specific certificate data]]
+
Logging and Auditing Vulnerability
  
* [[Failure to validate certificate expiration]]
+
Session Management Vulnerability]]
  
* [[Failure to check for certificate revocation]]
+
__NOTOC__
  
  
 +
[[Category:OWASP ASDR Project]]
 
[[Category:Vulnerability]]
 
[[Category:Vulnerability]]
 
 
[[Category:Synchronization and Timing Vulnerability]]
 
[[Category:Synchronization and Timing Vulnerability]]
 
 
[[Category:OWASP_CLASP_Project]]
 
[[Category:OWASP_CLASP_Project]]

Revision as of 13:14, 30 September 2008

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.

Last revision (mm/dd/yy): 09/30/2008

Vulnerabilities Table of Contents

ASDR Table of Contents


Description

If the revocation status of a certificate is not checked before each privilege requiring action, the system may be subject to a race condition, in which their certificate may be used before it is checked for revocation.

Consequences

  • Authentication: Trust may be assigned to an entity who is not who it claims to be.
  • Integrity: Data from an untrusted (and possibly malicious) source may be integrated.
  • Confidentiality: Date may be disclosed to an entity impersonating a trusted entity, resulting in information disclosure.

Exposure period

  • Design: Checks for certificate revocation should be included in the design of a system
  • Design: One can choose to use a language which abstracts out this part of the authentication process.

Platform

  • Languages: Languages which do not abstract out this part of the process.
  • Operating platforms: All

Required resources

Minor trust: Users must attempt to interact with the malicious system.

Severity

Medium

Likelihood of exploit

Medium

If a certificate is revoked after the initial check, all subsequent actions taken with the owner of the revoked certificate will loose all benefits guaranteed by the certificate. In fact, it is almost certain that the use of a revoked certificate indicates malicious activity.

If the certificate is checked before each access of a protected resource, the delay subject to a possible race condition becomes almost negligible and significantly reduces the risk associated with this issue.


Risk Factors

TBD

Examples

In C/C++:

if (!(cert = SSL_get_peer(certificate(ssl)) || !host)
  foo=SSL_get_veryify_result(ssl);
  if (X509_V_OK==foo)
//do stuff
  foo=SSL_get_veryify_result(ssl);
 //do more stuff without the check. 

Related Attacks


Related Vulnerabilities


Related Controls

  • Design: Ensure that certificates are checked for revoked status before each use of a protected resource


Related Technical Impacts


References

Note: A reference to related CWE or CAPEC article should be added when exists. Eg: