Fix SSL_SESSION leak in tls_parse_ctos_psk() on ticket error paths
Two early 'return 0' statements bypass the err: label cleanup that calls SSL_SESSION_free(sess). When tls_decrypt_ticket() allocates an SSL_SESSION but the decrypt_ticket_cb returns ABORT, the session is leaked. Replace 'return 0' with 'goto err' so the existing cleanup handles it.
This commit is contained in:
parent
81cc6cb97e
commit
96f424c439
1 changed files with 2 additions and 2 deletions
|
|
@ -1442,13 +1442,13 @@ int tls_parse_ctos_psk(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
|
|||
|
||||
if (ret == SSL_TICKET_EMPTY) {
|
||||
SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
|
||||
return 0;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (ret == SSL_TICKET_FATAL_ERR_MALLOC
|
||||
|| ret == SSL_TICKET_FATAL_ERR_OTHER) {
|
||||
SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
|
||||
return 0;
|
||||
goto err;
|
||||
}
|
||||
if (ret == SSL_TICKET_NONE || ret == SSL_TICKET_NO_DECRYPT)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue