/ Bug 3275 – Improper SSL/TLS certificate subjectAltName verification
Bug 3275 - Improper SSL/TLS certificate subjectAltName verification
: Improper SSL/TLS certificate subjectAltName verification
Status: CLOSED FIXED
Product: ProFTPD
mod_tls
: 1.3.1
: All All
: P3 normal
Assigned To: TJ Saunders
:
: Backport
:
:
  Show dependency treegraph
 
Reported: 2009-08-06 12:49 UTC by TJ Saunders
Modified: 2009-10-24 14:43 UTC (History)
4 users (show)

See Also:


Attachments
Fixes bug (3.02 KB, patch)
2009-08-06 12:55 UTC, TJ Saunders
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TJ Saunders 2009-08-06 12:49:41 UTC
A recent bug was found in fetchmail, which pointed out that when validing SSL
client certificates, fetchmail was not properly checking for embedded NUL
characters:

  http://www.fetchmail.info/fetchmail-SA-2009-01.txt

This is a bug for the mod_tls module as well, for the mod_tls module does a
similar verification of SSL client certs.  Specifically, for this embedded-NUL
issue to affect a server, the following mod_tls configuration must be in
effect:

  # Reverse DNS resolution MUST be on for this bug to manifest
  UseReverseDNS on

  <IfModule mod_tls.c>
    TLSEngine on

    # We have to be verifying clients' certs for this bug to manifest
    TLSVerifyClient on

    # and we have to be requiring that the subjectAltName field of the
    # client's certificate be a DNS name which matches the DNS name to which
    # the client's IP address was resolved
    TLSOptions dNSNameRequired
  </IfModule>

If reverse DNS resolution is off, OR if client certs are not being verified, OR
if the DNS name in the client cert is not required, then the bug does not
occur.
Comment 1 TJ Saunders 2009-08-06 12:55:09 UTC
Created attachment 3096 [details]
Fixes bug
Comment 2 TJ Saunders 2009-08-06 12:59:00 UTC
Patch committed to CVS.
Comment 3 TJ Saunders 2009-08-06 13:01:19 UTC
Backported to 1.3.2b; the attached patch applied cleanly to the 1.3.2a version
of mod_tls.
Comment 4 TJ Saunders 2009-08-11 11:37:15 UTC
See also:

  http://www.thoughtcrime.org/papers/null-prefix-attacks.pdf
Comment 5 TJ Saunders 2009-10-20 18:24:01 UTC
Resolved in 1.3.2b, 1.3.3rc2.
Comment 6 TJ Saunders 2009-10-24 14:43:47 UTC
CVE-2009-3639 assigned for this.