Hi,

Axel Beckert wrote:
> Certificate chain
>  0 s:OU = Domain Control Validated, OU = Globe Standard SSL, CN = 
> mirror.sinavps.ch
>     i:C = US, ST = DE, L = Wilmington, O = "Globe Hosting, Inc.", CN = 
> GlobeSSL DV Certification Authority 2
>  1 s:C = US, ST = DE, L = Wilmington, O = "Globe Hosting, Inc.", CN = 
> GlobeSSL DV Certification Authority 2
>    i:C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN 
> = USERTrust RSA Certification Authority
>  2 s:C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN 
> = USERTrust RSA Certification Authority
>    i:C = SE, O = AddTrust AB, OU = AddTrust External TTP Network, CN = 
> AddTrust External CA Root
> ---

https://archive.raspberrypi.org/ also seems to have been affected
(four hours ago, about 20:30 UTC) but is no more as of writing this
mail. Common demoniater with the affected https://mirror.sinavps.ch/
is the above mentioned "USERTrust RSA Certification Authority"
certificate.

> The longer I think about the more I think it is a bug in both OpenSSL
> and GnuTLS, because the certificate above is totally valid because the
> second last CA is actually no more an Intermediate CA but in
> ca-certificates, too.
> 
> But for some reason, even though the third certificate in the chain is
> trusted, both, OpenSSL and GnuTLS seem to see the fourth certificate
> and only seem to check if that one is trusted and not any inbetween.

This might be related to the used Intermediate CA certificate used on
the server side.

Because if https://archive.raspberrypi.org/ could be fixed on the
server side, this smells a lot like the Intermediate CA certificate.

So if that Intermediate CA certificate on the server includes the
"USERTrust RSA Certification Authority" certification, the client
doesn't seem to trust it even if a certificate with the same serial is
in it's own list of trusted certificates, and it tries to verify the
included signature, which is from the expired AddTrust.

So the amount of "bug" which could be argued is in OpenSSL and GnuTLS
is probably rather small. It's more a kind of missing feature to check
every Intermediate CA certificate if it is also by chance in the local
list of trusted CAs.

                Regards, Axel
-- 
 ,''`.  |  Axel Beckert <a...@debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

Reply via email to