30 ms·
GnuTLS: TLS 1.3 session resumption works without master key, allowing MITM
- caf 6y agoThis needs a "GnuTLS:" or CVE reference in the title.
- dogma1138 6y agoIndeed otherwise this might look like the SSLv3 Poodle issue to some.
- mytailorisrich 6y agoThanks for the heads up. It's crucial to point out that this is a GnuTLS bug not a TLS one.
- doener 6y agoThanks for the hint, fixed.
- taspeotis 6y agoThe HN title is currently "TLS 1.3 session resumption works without master key, allowing MITM" which only mentions TLS 1.3, while the CVE description mentions TLS 1.2 as well: > GnuTLS 3.6.x before 3.6.14 uses incorrect cryptography for encrypting a session ticket (a loss of confidentiality in TLS 1.2, and an authentication bypass in TLS 1.3). https://nvd.nist.gov/vuln/detail/CVE-2020-13777 https://nvd.nist.gov/vuln/detail/CVE-2020-13777
- dbrgn 6y agoAccording to this tweet, "For TLS 1.2, this enables passive decryption of traffic to/from GnuTLS servers when the client supports session tickets (which is common)". https://twitter.com/__agwa/status/1270054738344792070 https://twitter.com/__agwa/status/1270054738344792070
- tialaramex 6y agoRight. Specifically what's going on here is that for TLS 1.2 resumption your client remembers the secret keys it was using last time, but the server doesn't want to keep secret keys for every single client that might re-connect so it has its own secret Session Ticket Encryption Key (STEK) and it sends any client a "ticket" with the server's state for that client's connection in it, encrypted using the STEK. The not at all obvious problem in TLS 1.2 is that the state encapsulated in the ticket will work not only in some hypothetical future TLS resumption (which you might never do) but also the session you are in already now. And that ticket is sent over the wire if resumption is permitted, during session setup, before the symmetric encryption for the TLS channel has switched on. So what that means is that if you know the STEK (which now for affected GnuTLS servers you do) you can read any session you captured in which resumption was allowed, including fresh sessions which were never resumed, and passively decrypt the entire thing. Nothing anybody can do about it.
- billpg 6y agoSo this isn't a vulnerability inherent to TLS 1.3 that we need to start designing TLS 1.4? Edit: The title has since been fixed.
- Deukhoofd 6y agoNo, just a GnuTLS bug that was fixed in its recent release
- stefan_ 6y agoThe words "GnuTLS" or "mbedTLS/PolarSSL" strike fear into my heart. When picking a TLS library written by amateur cryptographers, make sure it is the one used by everyone else (OpenSSL).
- Jonnax 6y agoYeah. I recall OpenSSL used to have issues of lack of contributors. [1] Anyone have any reasons why it wouldn't be crazy to use a small project's solution? [1]https://arstechnica.com/information-technology/2014/04/tech-giants-chastened-by-heartbleed-finally-agree-to-fund-openssl/ https://arstechnica.com/information-technology/2014/04/tech-...
- terom 6y agoOpenSSL has licensing issues when linking with GPL applications (without an explicit exception in the GPL-licensed application, which is not uncommon). [1] Debian in particular does not allow distributing such packages, and the common workaround is to use GnuTLS instead. Unfortunately I can't find any good reference for this policy... Interestingly, it seems like OpenSSL 3.0 is going to be Apache v2 licensed. [2] [1] https://people.gnome.org/~markmc/openssl-and-the-gpl https://people.gnome.org/~markmc/openssl-and-the-gpl [2] https://www.openssl.org/source/license.html https://www.openssl.org/source/license.html
- pabs3 6y agoUnfortunately Apache v2 is still not compatible with GPLv2-only, so OpenSSL 3.0 will not solve all of the licensing issues, but some of them it will. Incidentally, an OpenSSL 3.0 alpha just reached Debian experimental.
- ssfivy 6y agoIsn't mbedTLS part of ARM now? For microcontrollers / bare metal devices that need to connect via Ethernet, it is probably one of the more reputable ones - unless there's another major library I haven't heard of?
- davidhyde 6y agoDifferent versions of TLS should not interact with each other. There are too many behavioral permutations to audit.
- Ayesh 6y agoThey don't. It's always the same version server and client negotiate. The vulnerability is in the way session tickets are encrypted (or rather the lack of it), which is present in both versions, but in different formats; for example in TLS 1.3, the session ticket is sent _after_ change cipher command. It's vulnerable in 1.2 and 1.3 because the way session ticket is encrypted. GnuTLS used effectively an all-zero key until it's rotated in the next tick.
- davidhyde 6y agoThanks, I must have misread the post: > "The issue applies to TLS 1.3, when using TLS 1.2 resumption fails as expected. Because the ticket can be used for resumption without knowledge of the master key I assume (but haven't tested yet) that it can also be used for passive decryption of early data." I assumed that the server was using a ticket generated using TLS 1.2 to somehow resume a TLS 1.3 connection.
- agwa 6y agoThe bug report downplays the severity of the problem. This comment comes the closest to explaining the severity: > ticket encryption key and decryption key are all-zero [...] in TLS 1.2, it may allow attackers to recover the previous conversations https://gitlab.com/gnutls/gnutls/-/issues/1011#note_353830633 https://gitlab.com/gnutls/gnutls/-/issues/1011#note_35383063...
- mijoharas 6y agoI was wondering how commonly used gnutls was. Gnutls is required by (among others) ffmpeg, emacs, vlc and wget.
- cesarb 6y agoThis bug is on the TLS server code, so the relevant question would be how commonly used gnutls is as a TLS server. Luckily, gnutls seems to be more popular as a client library than as a server library.
- SomeoneFromCA 6y agoI use it on a server. Way easier to use than opennsl, to my taste.
- typical182 6y agoIn terms of where it is used, here is a related tweet by Filippo Valsorda: https://twitter.com/FiloSottile/status/1270115515378384897 https://twitter.com/FiloSottile/status/1270115515378384897 For scale, this GnuTLS vulnerability is considerably worse than Heartbleed. If you use Linux distributions with GNU tendencies, you might want to check your dependency trees. (He is a cryptographer on the Go project, who also happened to win the CloudFlare Heartbleed Challenge). As he says, that thread is a good starting point for potentially vulnerable uses. Some sample quotes from that thread: —— The good news is that this is a server-side issue —— For obvious reasons, systemd ships a custom http server with client auth via GnuTLS. —— On Fedora "dnf repoquery --whatrequires gnutls" lists: Samba NetworkManager pacemaker qemu / libvirt wget rdesktop tigervnc gnupg Apache mod_gnutls ...
- simias 6y ago>For obvious reasons, systemd ships a custom http server with client auth via GnuTLS. I can't tell if that's a joke poking fun at systemd's bloat or a genuine comment. What does systemd need an HTTP server for? Is it enabled by default on most distros?
- microtherion 6y agoIn a way, maybe this is an (inadvertent) throwback to early GNU ideals: > "[When] passwords first appeared at the MIT AI Lab I [decided] to follow my belief that there should be no passwords," Stallman would later say. "Because I don't believe that it's really desirable to have security on a computer, I shouldn't be willing to help uphold the security regime." https://www.oreilly.com/openbook/freedom/ch07.html#86161 https://www.oreilly.com/openbook/freedom/ch07.html#86161
- deleted 6y ago[deleted]
- coldpie 6y agoThis is your weekly reminder that There Is No Such Thing As Computer Security. Treat your computing devices appropriately.
- bmurray7jhu 6y ago> [T]he [GnuTLS] code is fundamentally broken; most of its external and internal APIs are incapable of passing binary data without mangling it. The code is completely unsafe for handling binary data, and yet the nature of TLS processing is almost entirely dependent on secure handling of binary data. -Howard Chu (2007) https://www.openldap.org/lists/openldap-devel/200802/msg00072.html https://www.openldap.org/lists/openldap-devel/200802/msg0007...