From: "Laszlo Ersek" <lersek@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
"Li, Yi" <yi1.li@intel.com>, Jiewen Yao <jiewen.yao@intel.com>
Subject: Re: [edk2-devel] setting TLS ciphers is broken (openssl 3?)
Date: Fri, 29 Sep 2023 09:59:52 +0200 [thread overview]
Message-ID: <c0498b7c-3b06-9934-3bc6-97d8740141a1@redhat.com> (raw)
In-Reply-To: <onpnc4wm6nktbt6wcyemwxu5m5h3zwk63p4oqiuqcp7rgolfy6@m7ouivyfbdvz>
On 9/28/23 16:25, Gerd Hoffmann wrote:
>> The OpenSSL3 update may have restricted set (3), causing the grand
>> intersection to be empty.
>
> That seems to be the case. Maybe (2) needs an update to enable newer
> ciphers, when logging the mappings I see there are quite a few IDs which
> don't get mapped:
>
> TlsDxe:TlsSetCipherList: skipping CipherId=0x1302
> TlsDxe:TlsSetCipherList: skipping CipherId=0x1303
> TlsDxe:TlsSetCipherList: skipping CipherId=0x1301
> TlsDxe:TlsSetCipherList: skipping CipherId=0x1304
> TlsDxe:TlsSetCipherList: CipherId=0xC030 -> ECDHE-RSA-AES256-GCM-SHA384
> TlsDxe:TlsSetCipherList: skipping CipherId=0xCCA8
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC014
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC02F
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC013
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC012
> TlsDxe:TlsSetCipherList: CipherId=0xC02C -> ECDHE-ECDSA-AES256-GCM-SHA384
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC0AD
> TlsDxe:TlsSetCipherList: skipping CipherId=0xCCA9
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC00A
> TlsDxe:TlsSetCipherList: CipherId=0xC02B -> ECDHE-ECDSA-AES128-GCM-SHA256
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC0AC
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC009
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC008
> TlsDxe:TlsSetCipherList: skipping CipherId=0x009D
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC09D
> TlsDxe:TlsSetCipherList: CipherId=0x0035 -> AES256-SHA
> TlsDxe:TlsSetCipherList: skipping CipherId=0x009C
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC09C
> TlsDxe:TlsSetCipherList: CipherId=0x002F -> AES128-SHA
> TlsDxe:TlsSetCipherList: CipherId=0x000A -> DES-CBC3-SHA
> TlsDxe:TlsSetCipherList: CipherId=0x009F -> DHE-RSA-AES256-GCM-SHA384
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC09F
> TlsDxe:TlsSetCipherList: skipping CipherId=0xCCAA
> TlsDxe:TlsSetCipherList: CipherId=0x0039 -> DHE-RSA-AES256-SHA
> TlsDxe:TlsSetCipherList: skipping CipherId=0x009E
> TlsDxe:TlsSetCipherList: skipping CipherId=0xC09E
> TlsDxe:TlsSetCipherList: CipherId=0x0033 -> DHE-RSA-AES128-SHA
> TlsDxe:TlsSetCipherList: CipherId=0x0016 -> DHE-RSA-DES-CBC3-SHA
> TlsDxe:TlsSetCipherList: skipping CipherId=0x00A3
> TlsDxe:TlsSetCipherList: skipping CipherId=0x0038
> TlsDxe:TlsSetCipherList: skipping CipherId=0x00A2
> TlsDxe:TlsSetCipherList: skipping CipherId=0x0032
> TlsDxe:TlsSetCipherList: skipping CipherId=0x0013
> Not setting ciphers works.
Right, so the default cipher list built into OpenSSL3 (3) is not the
problem in itself, and (1) and (4) have not changed.
I have raised before that TlsCipherMappingTable should be kept in sync
with all the ciphers that we build in from OpenSSL:
* https://bugzilla.tianocore.org/show_bug.cgi?id=915#c0
(dated 2018-03-30):
> (3) While it is correct that an unrecognized EFI_TLS_CIPHER is rejected with
> EFI_UNSUPPORTED, the table used by TlsGetCipherString(), namely
> "TlsCipherMappingTable", is very lacking -- at commit 9c7d0d499296, it lists
> 23 cipher suites, and even those include "NULL-MD5" and "NULL-SHA".
>
> On my laptop, "openssl ciphers -V ALL" lists 110 cipher suites.
>
> The "TlsCipherMappingTable" array should include all ciphers that are
> supported by the OpenSSL release identified in
>
> CryptoPkg/Library/OpensslLib/OpenSSL-HOWTO.txt
>
> Whenever edk2 picks up a new OpenSSL release, the cipher table should be
> actualized.
* https://bugzilla.tianocore.org/show_bug.cgi?id=929
(reported on 2018-04-10; closed as WONTFIX by myself, approx. 5 years
later, because nobody cared):
> According to the mailing list discussion linked in
> <https://bugzilla.tianocore.org/show_bug.cgi?id=915#c8>,
> "TlsCipherMappingTable" should never offer *more* cipher suites than
> actually supported by OpensslLib (because then the TLS client might
> negotiate a cipher suite with the server that the client ultimately
> won't be able to support). However, for best coverage of the ciphers
> that *are* available, "TlsCipherMappingTable" should reasonably
> approach the set of ciphers that we enable in "OpensslLib.inf". Please
> review the latter set and merge the according cipher suite identifiers
> into "TlsCipherMappingTable".
Also reported by Microsoft separately:
* https://bugzilla.tianocore.org/show_bug.cgi?id=2541
(reported on 2020-02-20; in CONFIRMED state currently)
... I wonder how TlsCipherMappingTable looks in Project Mu!
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109186): https://edk2.groups.io/g/devel/message/109186
Mute This Topic: https://groups.io/mt/101613778/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-09-29 7:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 8:38 [edk2-devel] setting TLS ciphers is broken (openssl 3?) Gerd Hoffmann
2023-09-27 17:30 ` Yao, Jiewen
2023-09-28 1:32 ` Li, Yi
2023-09-28 9:11 ` Laszlo Ersek
2023-09-28 14:25 ` Gerd Hoffmann
2023-09-29 7:59 ` Laszlo Ersek [this message]
2023-09-29 8:42 ` Gerd Hoffmann
2023-09-29 8:52 ` Gerd Hoffmann
2023-09-29 10:19 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c0498b7c-3b06-9934-3bc6-97d8740141a1@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox