]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: ssl: wrong priority whem limiting ECDSA ciphers in ECDSA+RSA configuration
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 5 Jun 2024 09:37:14 +0000 (11:37 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 5 Jun 2024 13:33:36 +0000 (15:33 +0200)
commit93cc23a35561cd89b353143d20962dd86aa82a9c
tree62885569ab9c431104bcb30d9ed9ffb0fccb31a8
parent6697e87ae5e1f569dc87cf690b5ecfc049c4aab0
BUG/MEDIUM: ssl: wrong priority whem limiting ECDSA ciphers in ECDSA+RSA configuration

The ClientHello Callback which is used for certificate selection uses
both the signature algorithms and the ciphers sent by the client.

However, when a client is announcing both ECDSA and RSA capabilities
with ECSDA ciphers that are not available on haproxy side and RSA
ciphers that are compatibles, the ECDSA certificate will still be used
but this will result in a "no shared cipher" error, instead of a
fallback on the RSA certificate.

For example, a client could send
'ECDHE-ECDSA-AES128-CCM:ECDHE-RSA-AES256-SHA and HAProxy could be
configured with only 'ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA'.

This patch fixes the issue by validating that at least one ECDSA cipher
is available on both side before chosing the ECDSA certificate.

This must be backported on all stable versions.
src/ssl_sock.c