Client-Initiated Renegotiation DoS Vulnerability #486
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Client-Initiated Renegotiation DoS Vulnerability
The idea of using SSL/TLS renegotiation as a DoS attack vector was first widely publicized in 2011 with the release of the TLC-SSL-DOS tool. The attack vector is plausible because establishing SSL connections requires more processing power for servers than what is required for clients (Bernat). This gap in resource consumption creates an easy target for nefarious clients looking to exhaust server resources through DoS attacks in which the TLS handshake is repeatedly renegotiated. There is generally no compelling reason to allow client-initiated renegotiation of the TLS handshake:
-- SSL/TLS Deployment Best Practices
Encrypted PHP servers initialized via
stream_socket_server()
currently offer no mechanism to disable client-initiated TLS renegotiation and as a result afford no protection against the renegotiation DoS attack vector.Proposed Solution
"max_handshake_rate"
context option limiting the number of client-initiated renegotiation attempts allowed per second.Suggested Usage
Renegotiation rate-limiting is not enabled by default. Unless servers have a good reason for allowing client-initiated renegotiation they should disable this functionality as demonstrated in the example server script below: