Bug 50227 - Option to fail SSL handshake for diverted SNI connections
Summary: Option to fail SSL handshake for diverted SNI connections
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_ssl (show other bugs)
Version: 2.2.17
Hardware: All All
: P2 enhancement with 2 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: MassUpdate
Depends on:
Reported: 2010-11-07 01:03 UTC by Matt McCutchen
Modified: 2018-11-07 21:07 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Matt McCutchen 2010-11-07 01:03:00 UTC
In the presence of network attackers, an HTTPS server is liable to receive diverted connections asking for any site for which its certificate is valid, even if that site was supposed to be hosted elsewhere, and it is responsible for responding in a way that does not violate the integrity properties expected by clients.  (See discussion: http://www.ietf.org/mail-archive/web/tls/current/msg07142.html .)  One can set up a default vhost that responds to diverted connections with a relatively harmless error 400 or 403, but for SNI connections, it is even better to reject them at the SSL level.  I could not find any way to configure Apache to do that.  I tried the hack of disabling all protocols or ciphers on the default vhost, hoping to make sure the SSL handshake fails, but Apache detected that as a configuration error and refused to start.

I propose a new option, tentatively named SSLUnrecognizedName, which can be set on or off per vhost and causes SSL connections to that vhost to be rejected with an unrecognized_name error.  Server admins could simply enable that option on the "harmless" default vhost they set up for non-SNI clients.
Comment 1 felipe 2018-06-21 15:50:01 UTC
SNI is ubiquitous among HTTP clients nowadays.

IMO the default behavior should be analogous to:

if ($sni = sni_request()) {
    $vhost = get_vhost_for_sni($sni);

    if (!$vhost) {
        throw 'unrecognized_name';
else if (require_client_sni()) {
    throw $some_other_error;
else {
    $vhost = get_first_vhost_on_ip($ip);

If the request is invalid at the TLS level, it makes sense to fail that request without passing it down to HTTP.
Comment 2 William A. Rowe Jr. 2018-11-07 21:07:55 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.