Closed Bug 1575244 Opened 6 years ago Closed 6 years ago

Hyphen at the beginning/end of subdomain causes SSL_ERROR_BAD_CERT_DOMAIN Warning

Categories

(NSS :: Libraries, enhancement, P3)

enhancement

Tracking

(firefox68 affected, firefox69 affected, firefox70 affected)

RESOLVED DUPLICATE of bug 1184059
Tracking Status
firefox68 --- affected
firefox69 --- affected
firefox70 --- affected

People

(Reporter: xdavid, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Open the URL: https://test-.github.io/ or the URL https://-test.github.io/

OS/Versions: MacOS Sierra 10.12.6, Firefox 68.0.2

Actual results:

SSL_ERROR_BAD_CERT_DOMAIN Warning displayed, saying "[...] certificate that is not valid for test-.github.io. The certificate is only valid for the following names: www.github.com, *.github.io, [...]"

Expected results:

The domains beginning or ending in a hyphen should be valid for the wildcard certificate.

Google Chrome loads the site (https://test-.github.io/) and says that the certificate is valid.

When the hyphen is at the beginning (https://-test.github.io/), Google Chrome says "-test.github.io’s server IP address could not be found.", but Firefox still loads the site with the SSL_ERROR_BAD_CERT_DOMAIN Warning.

Hi,
I can reproduce this and I'm setting the component, in order to involve the development team.
Thanks for reporting!

Status: UNCONFIRMED → NEW
Component: Untriaged → Security
Ever confirmed: true
Product: Firefox → Core

Per RFC 3696, any characters, or combination of bits (as octets), are permitted in DNS names. This supercedes RFC 1035's more restrictive LDH-in-middle-only approach.

IMO we shouldn't put more restrictions on DNS labels than the resolver does.

This would need to be changed in Mozilla::PKIX, part of NSS.

Marking as an enhancement, as general adherence to RFC 1035 is not a defect, but it'd be nice to be lenient here a-la RFC 3696.

Assignee: nobody → nobody
Type: defect → enhancement
Component: Security → Libraries
OS: Unspecified → All
Priority: -- → P3
Product: Core → NSS
QA Contact: jjones
Hardware: Unspecified → All
Version: 68 Branch → trunk
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.