]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Clarify that SSL_shutdown() must not be called after a fatal error
authorMatt Caswell <matt@openssl.org>
Wed, 20 Feb 2019 14:21:36 +0000 (14:21 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 26 Feb 2019 14:13:05 +0000 (14:13 +0000)
Follow on from CVE-2019-1559

Reviewed-by: Richard Levitte <levitte@openssl.org>
doc/ssl/SSL_get_error.pod
doc/ssl/SSL_shutdown.pod

index 2a93894096e768673fcd759a3721bbbc845b2519..7537616d475c720436d38153ec3f1e1b34f18a55 100644 (file)
@@ -90,14 +90,17 @@ Details depend on the application.
 
 =item SSL_ERROR_SYSCALL
 
-Some non-recoverable I/O error occurred.
-The OpenSSL error queue may contain more information on the error.
-For socket I/O on Unix systems, consult B<errno> for details.
+Some non-recoverable, fatal I/O error occurred. The OpenSSL error queue may
+contain more information on the error. For socket I/O on Unix systems, consult
+B<errno> for details. If this error occurs then no further I/O operations should
+be performed on the connection and SSL_shutdown() must not be called.
 
 =item SSL_ERROR_SSL
 
-A failure in the SSL library occurred, usually a protocol error.  The
-OpenSSL error queue contains more information on the error.
+A non-recoverable, fatal error in the SSL library occurred, usually a protocol
+error.  The OpenSSL error queue contains more information on the error. If this
+error occurs then no further I/O operations should be performed on the
+connection and SSL_shutdown() must not be called.
 
 =back
 
index efbff5a0a3230ace064b5a5951aabc39cae2be4b..e2a776cf1c73a8a72f0c6b9673ab66cd9fea2d7a 100644 (file)
@@ -22,6 +22,10 @@ Whether the operation succeeds or not, the SSL_SENT_SHUTDOWN flag is set and
 a currently open session is considered closed and good and will be kept in the
 session cache for further reuse.
 
+Note that SSL_shutdown() must not be called if a previous fatal error has
+occurred on a connection i.e. if SSL_get_error() has returned SSL_ERROR_SYSCALL
+or SSL_ERROR_SSL.
+
 The shutdown procedure consists of 2 steps: the sending of the "close notify"
 shutdown alert and the reception of the peer's "close notify" shutdown
 alert. According to the TLS standard, it is acceptable for an application