SSL: nenhum nome de entidade de certificado alternativo corresponde | Nova versão do CURL(USN-6237-1) traz sofrimento

SSL: nenhum nome de entidade de certificado alternativo corresponde | Nova versão do CURL(USN-6237-1) traz sofrimento

Desde o novo lançamento do CURLhttps://ubuntu.com/security/notices/USN-6237-1enfrentamos problemas com o comando curl no Ubuntu:

sudo apt update -y && sudo apt install --no-install-recommends -y curl
curl -vvv https://downloads.apache.org/maven/maven-3/3.8.8/binaries/

Erro:

*   Trying 88.99.95.219:443...
99
* Connected to downloads.apache.org (88.99.95.219) port 443 (#0)
100
* ALPN, offering h2
101
* ALPN, offering http/1.1
102
*  CAfile: /etc/ssl/certs/ca-certificates.crt
103
*  CApath: /etc/ssl/certs
104
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
105
} [5 bytes data]
106
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
107
} [512 bytes data]
108
* TLSv1.2 (IN), TLS header, Certificate Status (22):
109
{ [5 bytes data]
110
* TLSv1.3 (IN), TLS handshake, Server hello (2):
111
{ [122 bytes data]
112
* TLSv1.2 (IN), TLS header, Finished (20):
113
{ [5 bytes data]
114
* TLSv1.2 (IN), TLS header, Supplemental data (23):
115
{ [5 bytes data]
116
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
117
{ [25 bytes data]
118
* TLSv1.2 (IN), TLS header, Supplemental data (23):
119
{ [5 bytes data]
120
* TLSv1.3 (IN), TLS handshake, Certificate (11):
121
{ [4583 bytes data]
122
* TLSv1.2 (IN), TLS header, Supplemental data (23):
123
{ [5 bytes data]
124
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
125
{ [264 bytes data]
126
* TLSv1.2 (IN), TLS header, Supplemental data (23):
127
{ [5 bytes data]
128
* TLSv1.3 (IN), TLS handshake, Finished (20):
129
{ [52 bytes data]
130
* TLSv1.2 (OUT), TLS header, Finished (20):
131
} [5 bytes data]
132
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
133
} [1 bytes data]
134
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
135
} [5 bytes data]
136
* TLSv1.3 (OUT), TLS handshake, Finished (20):
137
} [52 bytes data]
138
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
139
* ALPN, server accepted to use http/1.1
140
* Server certificate:
141
*  subject: CN=*.apache.org
142
*  start date: Jun 29 00:00:00 2022 GMT
143
*  expire date: Jul 30 23:59:59 2023 GMT
144
*  subjectAltName does not match downloads.apache.org
145
* SSL: no alternative certificate subject name matches target host name 'downloads.apache.org'
146
* Closing connection 0
147
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
148
} [5 bytes data]
149
* TLSv1.3 (OUT), TLS alert, close notify (256):
150
} [2 bytes data]
151
curl: (60) SSL: no alternative certificate subject name matches target host name 'downloads.apache.org'
152
More details here: https://curl.se/docs/sslcerts.html

Como corrigi-lo? Deveríamos, desde agora, controlar certificados de terceiros de alguma forma? Funcionou ontem. desde já, obrigado

Responder1

Parece que houve um backport quebrado para uma correção de segurança. Deve ser corrigido em 7.81.0-1ubuntu1.13 que corrige 7.81.0-1ubuntu1.11. Dehttps://launchpad.net/ubuntu/jammy/+source/curl/+changelog:

curl (7.81.0-1ubuntu1.13) jammy-security; urgency=medium

  * SECURITY REGRESSION: broken ssl cert wildcard handling (LP: #2028170)
    - debian/patches/CVE-2023-28321.patch: fix missing line in backport.

 -- Marc Deslauriers <email address hidden>  Wed, 19 Jul 2023 12:23:36 -0400
curl (7.81.0-1ubuntu1.11) jammy-security; urgency=medium

  * SECURITY UPDATE: improper certificate validation vulnerability
    - debian/patches/CVE-2023-28321.patch: fix host name wildcard checking
      in lib/hostcheck.c, tests/data/test1397, tests/unit/unit1397.c.
    - CVE-2023-28321

Responder2

Métodos para chegar à versão mais antiga:

Remova-o e use-o aptpara instalar a versão anterior. Aqui está o tópico mais ativo na UA sobre isso:Como fazer downgrade de um pacote via apt-get?Também é possívelinstalar da fonte. Esse pode ser um método melhor: você pode deixar a versão do apt como está, aguardar uma atualização/correção de bug e tentar a nova junto com a versão de instalação de origem.

Verifique se algum desses resolve o seu problema. Em caso afirmativo, envie um relatório de bug. Se você quiser manter a versão mais antiga do aptalfineteo pacote

Responder3

Este é um bug confirmado:https://bugs.launchpad.net/ubuntu/+source/curl/+bug/2028170

Eles já consertaram revertendo as alterações e a nova versão do pacote estará disponível em breve.

informação relacionada