Skip to content

Commit

Permalink
Do not send an empty supported groups extension
Browse files Browse the repository at this point in the history
This allows handshake to proceed if the maximum TLS version enabled is <1.3

Fixes openssl#13583

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from openssl#18213)
  • Loading branch information
t8m committed May 5, 2022
1 parent ac2d4cb commit bd16488
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
24 changes: 14 additions & 10 deletions CHANGES
Expand Up @@ -9,20 +9,24 @@

Changes between 1.1.1o and 1.1.1p [xx XXX xxxx]

*)
*) When OpenSSL TLS client is connecting without any supported elliptic
curves and TLS-1.3 protocol is disabled the connection will no longer fail
if a ciphersuite that does not use a key exchange based on elliptic
curves can be negotiated.
[Tomáš Mráz]

Changes between 1.1.1n and 1.1.1o [3 May 2022]

*) Fixed a bug in the c_rehash script which was not properly sanitising shell
metacharacters to prevent command injection. This script is distributed by
some operating systems in a manner where it is automatically executed. On
such operating systems, an attacker could execute arbitrary commands with the
privileges of the script.

Use of the c_rehash script is considered obsolete and should be replaced
by the OpenSSL rehash command line tool.
(CVE-2022-1292)
[Tomáš Mráz]
metacharacters to prevent command injection. This script is distributed
by some operating systems in a manner where it is automatically executed.
On such operating systems, an attacker could execute arbitrary commands
with the privileges of the script.

Use of the c_rehash script is considered obsolete and should be replaced
by the OpenSSL rehash command line tool.
(CVE-2022-1292)
[Tomáš Mráz]

Changes between 1.1.1m and 1.1.1n [15 Mar 2022]

Expand Down
16 changes: 15 additions & 1 deletion ssl/statem/extensions_clnt.c
Expand Up @@ -118,6 +118,8 @@ static int use_ecc(SSL *s)
int i, end, ret = 0;
unsigned long alg_k, alg_a;
STACK_OF(SSL_CIPHER) *cipher_stack = NULL;
const uint16_t *pgroups = NULL;
size_t num_groups, j;

/* See if we support any ECC ciphersuites */
if (s->version == SSL3_VERSION)
Expand All @@ -139,7 +141,19 @@ static int use_ecc(SSL *s)
}

sk_SSL_CIPHER_free(cipher_stack);
return ret;
if (!ret)
return 0;

/* Check we have at least one EC supported group */
tls1_get_supported_groups(s, &pgroups, &num_groups);
for (j = 0; j < num_groups; j++) {
uint16_t ctmp = pgroups[j];

if (tls_curve_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
return 1;
}

return 0;
}

EXT_RETURN tls_construct_ctos_ec_pt_formats(SSL *s, WPACKET *pkt,
Expand Down

0 comments on commit bd16488

Please sign in to comment.